Fusuma

Components / Composite

button_group

Joined buttons that are each an action, none of them chosen (Cut, Copy, Paste).

Try it

This is the Bars page of the gallery, running in your browser: button_group is on it, and it is the real widget. Press Run, then use it.

Live: Bars, where button_group is usedOpen full size

Also on this pagetop_bartoolbaricon_badgefabsearch_barmarksnavigation_bartoggle_groupchip_groupavatar_group

Joined buttons that are each an action, none of them chosen (Cut, Copy, Paste).

Signature

pub const fn button_group<'a, M>( labels: &'a [&'a str], on_press: fn(usize) -> M, ) -> Choices<'a, M>

Example

use fusuma::button_group;
let view = button_group(&["Cut", "Copy", "Paste"], |i| i);
let built = fusuma::doc::built::<usize, _>(&view);
assert_eq!(built.texts(), ["Cut", "Copy", "Paste"]);

All components · Source