Fusuma

Components / Composite

chip_group

Chips that wrap onto more lines, any number on (filters, tags to pick).

Try it

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

Live: Bars, where chip_group is usedOpen full size

Also on this pagetop_bartoolbaricon_badgefabsearch_barmarksnavigation_bartoggle_groupbutton_groupavatar_group

Chips that wrap onto more lines, any number on (filters, tags to pick).

Give it a width: the chips wrap onto another line when they do not fit.

Signature

pub const fn chip_group<'a, M>( labels: &'a [&'a str], on: u32, on_toggle: fn(usize) -> M, ) -> Choices<'a, M>

Example

use fusuma::chip_group;
let view = chip_group(&["Rust", "Embedded", "UI"], 0b011, |i| i);
let built = fusuma::doc::built::<usize, _>(&view);
assert_eq!(built.texts(), ["Rust", "Embedded", "UI"]);

All components · Source