Fusuma

Components / Components

breadcrumbs

Breadcrumbs for parts, sending the index of the part that was pressed.

Try it

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

Live: Components, where breadcrumbs is usedOpen full size

Also on this pagealertbannersnackbarstepsgaugetile

Breadcrumbs for parts, sending the index of the part that was pressed. The last part is where you are: plain text.

Signature

pub const fn breadcrumbs<'a, M>( parts: &'a [&'a str], on_press: fn(usize) -> M, ) -> Breadcrumbs<'a, M>

Example

use fusuma::breadcrumbs;
let view = breadcrumbs(&["Home", "Library", "Jazz"], |i| i);
let built = fusuma::doc::built::<usize, _>(&view);
assert!(built.texts().contains(&"Library"));

All components · Source