When to use it
Attach the modifier above a vertical lazy or scrollable child and pass the same state to the bottom bar. Keep Scaffold, navigation, and collection state application-owned.
Coordinate Material bottom navigation visibility through the Compose nested-scroll chain.
Native example
Attach the modifier above a vertical lazy or scrollable child and pass the same state to the bottom bar. Keep Scaffold, navigation, and collection state application-owned.
val navigationScrollState = rememberLumenNavigationBarScrollState()
Scaffold(
modifier = Modifier.lumenNavigationBarScrollBehavior(navigationScrollState),
bottomBar = {
LumenNavigationBar(
items = destinations,
selectedValue = destination,
onValueChange = ::setDestination,
scrollState = navigationScrollState
)
}
) { padding ->
LazyColumn(contentPadding = padding) { /* application content */ }
}Reference
The primary shared and platform-specific options exposed by LumenNavigationBarScrollState.
| API | Values or type | Default | Description |
|---|---|---|---|
| initiallyVisible | Boolean | true | Sets the remembered initial visibility. |
| threshold | Dp | 16.dp | Sets deliberate travel required before visibility changes. |
| show() | function | Available | Reveals navigation for application-owned events. |
| hide() | function | Available | Hides navigation for application-owned events. |
Native behavior
Attach the modifier above a vertical lazy or scrollable child and pass the same state to the bottom bar. Keep Scaffold, navigation, and collection state application-owned.
The behavior observes but does not consume nested-scroll input. After exit, the Material navigation bar is absent from layout and semantics.