pub fn native_tab_bar(
items: Vec<TabItem>,
selected: impl Into<TabId>,
) -> NativeTabBarViewExpand description
A native bottom tab bar over items, with the app-owned selected tab —
see NativeTabBarView. A selected id no item carries shows no
selection; duplicate ids resolve to the first item carrying them; at most
16 items are shown (crate::controls::tab_bar::MAX_ITEMS).
ⓘ
let nav = router.route_navigator();
native_tab_bar(
vec![
TabItem::new("home", "Home", TabIcon::AppleSymbol("house".into())),
TabItem::new("inbox", "Inbox", TabIcon::AppleSymbol("tray".into())).badge("3"),
],
TabId::new(current_tab.get()),
)
.on_select(move |id| nav.go(format!("/{id}")))