Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
FormsAndroid

Segmented control

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

Public APILumenSegmentedControlAndroid / Compose

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 Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenSegmentedControl(
    label = "View",
    options = viewOptions,
    value = view,
    onValueChange = ::setView
)

Reference

Public API

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

APIValues or typeDefaultDescription
labelStringRequiredNames the single-selection group.
optionsList<LumenSelectionOption>RequiredProvides the short labeled segment values.
valueStringRequiredStores the selected value.
onValueChange(String) -> UnitRequiredUpdates the selected value.
showLabelBooleantrueControls 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 NativeApple / SwiftUI
Android docsCompose module