Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
NavigationAndroid

Top app bar

Present native screen titles, navigation, and scrolling app bars.

Public APILumenTopAppBarAndroid / Compose

Native example

Use Top app bar

Use a remembered scrolling behavior and attach its nested-scroll connection above native scroll content. The application owns routing and Scaffold content padding.

Top app bar rendered in the Android phone emulator Lumen playground
Captured exampleAndroid phone emulator
kotlin
val behavior = rememberLumenTopAppBarScrollBehavior(LumenTopAppBarScrollMode.EnterAlways)
// Attach Modifier.nestedScroll(behavior.nestedScrollConnection) to the screen container.
LumenTopAppBar("Projects", scrollBehavior = behavior,
    navigationIcon = { LumenIconButton(LumenIconName.ArrowLeft, "Back", onClick = ::goBack) })

Reference

Public API

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

APIValues or typeDefaultDescription
titleStringRequiredProvides the visible screen heading.
sizeLumenTopAppBarSizeSmallSelects Small, Medium, or Large native geometry.
scrollBehaviorLumenTopAppBarScrollBehavior?nullCoordinates Pinned, EnterAlways, or ExitUntilCollapsed behavior.
navigationIcon / actions@Composable slotsEmptyProvides independently named application actions.
modifierModifierModifierApplies bar layout.

Native behavior

Design and accessibility

When to use it

Use a remembered scrolling behavior and attach its nested-scroll connection above native scroll content. The application owns routing and Scaffold content padding.

Accessibility

Exposes a screen heading and preserves native navigation, action, and window-inset semantics.

Android docsCompose module