Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FormsApple

Segmented control

Choose one value from a compact row of short peer options.

Public APILumenSegmentedControlApple / 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 Segmented control

Use for two to four short peer options that fit comfortably on one row. Use Radio group for longer labels, descriptions, or larger sets.

Segmented control rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenSegmentedControl(
    "View",
    selection: $view,
    options: viewOptions
)

Reference

Public API

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

APIValues or typeDefaultDescription
labelStringRequiredNames the single-selection group.
options[LumenSelectionOption<Value>]RequiredProvides the short labeled segment values.
selectionBinding<Value>RequiredStores the selected value.
onValueChangeBinding setterRequiredUpdates the selected value.
showsLabelBooleantrueControls visible label presentation while preserving the accessible group name.

Native behavior

Design and accessibility

When to use it

Use for two to four short peer options that fit comfortably on one row. Use Radio group for longer labels, descriptions, or larger sets.

Accessibility

Segments expose radio-style single-selection semantics inside a named group while retaining selected and disabled state.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package