Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
NavigationAndroid

Navigation bar scroll behavior

Coordinate Material bottom navigation visibility through the Compose nested-scroll chain.

Public APILumenNavigationBarScrollStateAndroid / Compose

Native example

Use Navigation bar scroll 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.

Navigation bar scroll behavior rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
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

Public API

The primary shared and platform-specific options exposed by LumenNavigationBarScrollState.

APIValues or typeDefaultDescription
initiallyVisibleBooleantrueSets the remembered initial visibility.
thresholdDp16.dpSets deliberate travel required before visibility changes.
show()functionAvailableReveals navigation for application-owned events.
hide()functionAvailableHides navigation for application-owned events.

Native behavior

Design and accessibility

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.

Accessibility

The behavior observes but does not consume nested-scroll input. After exit, the Material navigation bar is absent from layout and semantics.

Android docsCompose module