Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FormsApple

Range slider

Choose bounded numeric intervals with independently adjustable native endpoints.

Public APILumenRangeSliderApple / 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 Range slider

Bounds must be finite, increasing, and have a finite span. Nonfinite values fall back to bounds; reversed endpoints reorder for display without changing host state. Keep exact financial arithmetic in the application.

Range slider rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulator
swift
LumenRangeSlider("Capacity", value: $capacity, in: 0...100, step: 10,
    formatValue: { "\(Int($0))%" })

Reference

Public API

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

APIValues or typeDefaultDescription
label / valueLocalizedStringKey / Binding<ClosedRange<Double>>RequiredNames and controls the numeric interval.
inClosedRange<Double>0...100Provides valid inclusive bounds.
stepDouble?nilCompose counts intermediate stops; Swift and React Native use positive increments.
startLabel / endLabel / formatValueLocalizedStringKey / LocalizedStringKey / (Double) -> StringMinimum / Maximum / numeric textLocalizes both endpoint names and values.
disabled / readOnlyBoolEnabled / editableBlocks adjustment while retaining values.
———Reports the end of native adjustment.
——NoneApplies control layout.

Native behavior

Design and accessibility

When to use it

Bounds must be finite, increasing, and have a finite span. Nonfinite values fall back to bounds; reversed endpoints reorder for display without changing host state. Keep exact financial arithmetic in the application.

Accessibility

Exposes separately named lower and upper native thumbs with formatted spoken values and keyboard adjustment.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package