Available on crate feature
selector_bar only.Expand description
A SelectorBar provides single selection from a collection of Items highlighted by an
indicator.
§Example
ⓘ
#[derive(Clone)]
enum Message {
TabSelected(u32),
}
fn view(&self) -> Element<'_, Message, Theme> {
let tabs = (0..5).map(|i| item(i, text!("Tab {}", i + 1)));
selector_bar(tabs, self.selected_tab, Message::TabSelected).into()
}Re-exports§
pub use item::Item;
Modules§
Structs§
- Selector
Bar - A
SelectorBarprovides single selection from a collection ofItems highlighted by an indicator. - Style
- The appearance of a
SelectorBar.