Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
NavigationApple

Navigation bar

Select among peer application destinations with native visuals and controlled state.

Public APILumenNavigationBarApple / 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 TV · tvOS 16+Apple Vision · visionOS 1+Apple Watch · watchOS 9+

Native example

Use Navigation bar

Use for a small set of peer app destinations. Keep hierarchical navigation, history, deep links, restoration, and screen rendering in the application router or native navigation stack.

Navigation bar rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenNavigationBar(
    selection: $destination,
    items: destinations,
    onReselect: scrollDestinationToTop
)

Reference

Public API

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

APIValues or typeDefaultDescription
items[LumenNavigationItem<Selection>]RequiredProvides destination values, short labels, native icons, disabled state, and optional dot, text, or capped count badges.
selectionBinding<Selection>RequiredStores the active destination.
onValueChangeBinding setterRequiredRequests a destination change without owning navigation history.
onReselect((Selection) -> Void)?nilHandles a second activation of the selected destination, such as scrolling to top or popping its stack.
labelStringPrimary navigationNames the destination group for assistive technology.

Native behavior

Design and accessibility

When to use it

Use for a small set of peer app destinations. Keep hierarchical navigation, history, deep links, restoration, and screen rendering in the application router or native navigation stack.

Accessibility

The group has a readable navigation label and every destination exposes selected and disabled state through native tab semantics.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package