Skip to main content

Module selector_bar

Module selector_bar 

Source
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§

item

Structs§

SelectorBar
A SelectorBar provides single selection from a collection of Items highlighted by an indicator.
Style
The appearance of a SelectorBar.

Traits§

Catalog

Functions§

item
transparent

Type Aliases§

StyleFn