Extra
NavigationRail
A FormaUI navigation rail — top-level destination switching for tablet/desktop-width screens, delegating to Material 3's NavigationRail.
dev.formaui.components.navigation
with headeritem with numeric badgeitem with dot badge
Preview
This toggle is site chrome only — the preview has its own light/dark switch inside.
Live preview
Live preview — ~37 MB development build
Usage
var selected by remember { mutableIntStateOf(0) }
FormaNavigationRail(
header = { Text("+") },
) {
FormaNavigationRailItem(selected = selected == 0, onClick = { selected = 0 }, icon = { Text("🏠") }, label = "Home")
FormaNavigationRailItem(selected = selected == 1, onClick = { selected = 1 }, icon = { Text("🔔") }, label = "Alerts", badgeCount = 12)
FormaNavigationRailItem(selected = selected == 2, onClick = { selected = 2 }, icon = { Text("👤") }, label = "Profile", showBadgeDot = true)
}Accessibility
48dp touch target and selection semantics come from Material 3's NavigationRailItem; supply a contentDescription on each item's icon.