Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
NavigationAndroid

Tabs

Switch a controlled native content panel from an accessible tab list.

Public APILumenTabsAndroid / Compose

Native example

Use Tabs

Use for two to five peer content views whose panel changes in place. Keep URL history and nested destination navigation in the application router; use Navigation bar for top-level app destinations.

Tabs rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenTabs(
    label = "Workspace views",
    options = workspaceTabs,
    value = activeTab,
    onValueChange = ::setActiveTab
) { selected ->
    WorkspaceTabPanel(selected)
}

Reference

Public API

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

APIValues or typeDefaultDescription
labelStringRequiredNames the tab list for assistive technology.
optionsList<LumenSelectionOption>RequiredProvides stable tab values, short labels, and optional disabled state.
valueStringRequiredStores the active tab.
onValueChange(String) -> UnitRequiredUpdates controlled tab selection.
contentNative content viewRequiredRenders the active panel while Lumen owns the tab list and panel relationship.

Native behavior

Design and accessibility

When to use it

Use for two to five peer content views whose panel changes in place. Keep URL history and nested destination navigation in the application router; use Navigation bar for top-level app destinations.

Accessibility

Every tab exposes selected and disabled state, the tab list has a readable name, and the active panel is announced when selection changes.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module