Fusuma

Components / Components

tag

A short word in a pill of a tone: a status, a count, a label.

Try it

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

Live: Climate, where tag is usedOpen full size

Also on this pageitemtabtab_bar

A short word in a pill of a tone: a status, a count, a label.

Signature

pub fn tag<'a, M: Clone + 'a>(tone: Tone, label: &'a str) -> impl View<M> + 'a

Example

use fusuma::{Tone, row, tag, text};
let view = row((text("Build"), tag(Tone::Success, "passing")));
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["Build", "passing"]);

All components · Source