CamoNavigationBar
The bottom bar for a phone top-level destinations (3 to 5). selected in, onSelect out; routing stays
with the app router (ADR-19). Items are announced "Home, tab, 1 of 4, selected" with their badge, the
arrow keys move between them, and visible = false slides the bar out (pair it with rememberHideOnScroll).
Reselecting the current item calls onSelect again, so apps can scroll to the top.
API
- Kotlin
- Dart
public fun <T> CamoNavigationBar(
items: List<CamoNavItem<T>>,
selected: T,
onSelect: (T) -> Unit,
modifier: Modifier = Modifier,
visible: Boolean = true,
)
| Name | Type | Default |
|---|---|---|
items | List<CamoNavItem<T>> | required |
selected | T | required |
onSelect | (T) -> Unit | required |
modifier | Modifier | Modifier |
visible | Boolean | true |
Design notes
Why CamoNavigationBar works this way, its states and its edge cases: contributor docs.