Extra
NavigationDrawer
A FormaUI modal navigation drawer — an off-canvas panel of destinations that slides in over content and is dismissed with a scrim tap, delegating to Material 3's ModalNavigationDrawer.
dev.formaui.components.navigation
modal
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
val drawerState = rememberDrawerState(DrawerValue.Open)
var selected by remember { mutableIntStateOf(0) }
FormaModalNavigationDrawer(
drawerState = drawerState,
drawerContent = {
FormaNavigationDrawerItem(label = "Inbox", selected = selected == 0, onClick = { selected = 0 }, badge = "24")
FormaNavigationDrawerItem(label = "Sent", selected = selected == 1, onClick = { selected = 1 })
},
) {
Text("Mail content behind the drawer")
}Accessibility
Item icons should carry a contentDescription for accessibility (noted on the icon param); dismissible via scrim tap and (when gesturesEnabled) swipe.