JetpackNavigationSuiteScaffold
fun JetpackNavigationSuiteScaffold(navigationSuiteItems: JetpackNavigationSuiteScope.() -> Unit, modifier: Modifier = Modifier, windowAdaptiveInfo: WindowAdaptiveInfo = currentWindowAdaptiveInfo(), content: @Composable () -> Unit)(source)
Jetpack navigation suite scaffold with item and content slots. Wraps Material 3 NavigationSuiteScaffold.
Layout selection delegates to NavigationSuiteScaffoldDefaults.calculateFromAdaptiveInfo. An expanded window does not necessarily select a drawer.
Usage excerpt inside a composable; destination data and callbacks are supplied by the caller:
JetpackNavigationSuiteScaffold(
navigationSuiteItems = {
destinations.forEach { destination ->
val selected = destination == currentDestination
item(
selected = selected,
onClick = { onNavigateToDestination(destination) },
icon = { Icon(destination.unselectedIcon, contentDescription = null) },
selectedIcon = { Icon(destination.selectedIcon, contentDescription = null) },
label = { Text(stringResource(destination.labelRes)) },
)
}
},
) {
// Render the app's NavDisplay here; see JetpackApp for entry registration and decorators.
}Content copied to clipboard
See also:
JetpackNavigationBar for bottom navigation only
JetpackNavigationRail for rail navigation only
Comprehensive examples in the Components Guide documentation
Parameters
modifier
Modifier to be applied to the navigation suite scaffold.
navigationSuiteItems
A slot to display multiple items via JetpackNavigationSuiteScope.
windowAdaptiveInfo
The window adaptive info.
content
The app content inside the scaffold.