Fusuma

Components / Composite

navigation_rail

The same as a navigation_bar, as a column down the side of a wide screen.

How it looks

Drawn by the toolkit from the example below. No page of the gallery uses navigation_rail yet, so there is nothing to run.

navigation_rail drawn by Fusuma

The same as a navigation_bar, as a column down the side of a wide screen.

Signature

pub const fn navigation_rail<'a, M>( labels: &'a [&'a str], current: u32, on_select: fn(usize) -> M, ) -> Choices<'a, M>

Example

use fusuma::navigation_rail;
let view = navigation_rail(&["Home", "Search"], 0b01, |i| i);
let built = fusuma::doc::built::<usize, _>(&view);
assert_eq!(built.texts(), ["Home", "Search"]);

All components · Source