Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
NavigationApple

Tabs

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

Public APILumenTabsApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

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 iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenTabs(
    "Workspace views",
    selection: $activeTab,
    options: workspaceTabs
) { selected in
    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.
options[LumenSelectionOption<Value>]RequiredProvides stable tab values, short labels, and optional disabled state.
selectionBinding<Value>RequiredStores the active tab.
onValueChangeBinding setterRequiredUpdates 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 NativeAndroid / Compose
Apple docsSwiftUI package