Fusuma

Components / Components

banner

A solid strip of a tone with one line on it (text in black or white, whichever reads).

Try it

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

Live: Components, where banner is usedOpen full size

Also on this pagealertsnackbarbreadcrumbsstepsgaugetile

A solid strip of a tone with one line on it (text in black or white, whichever reads).

Signature

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

Example

use fusuma::{Tone, banner};
let view = banner(Tone::Danger, "You are offline");
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["You are offline"]);

All components · Source