Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FormsApple

Slider

Adjust a continuous or stepped numeric value with a visible formatted label.

Public APILumenSliderApple / 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 Slider

Use for an approximate or continuously adjustable numeric value. Prefer TextField or Picker when exact entry is more important.

Slider rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenSlider(
    "Minimum speed",
    value: $minimumSpeed,
    in: 1_000...5_000,
    step: 100,
    valueLabel: "\(Int(minimumSpeed)) RPM"
)

Reference

Public API

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

APIValues or typeDefaultDescription
valueBinding<Double>RequiredStores the current numeric value.
boundsClosedRange<Double>RequiredDefines the valid range.
stepDouble?nilAdds valid stepped increments when positive and finite.
valueLabelString?nilShows a formatted current value.

Native behavior

Design and accessibility

When to use it

Use for an approximate or continuously adjustable numeric value. Prefer TextField or Picker when exact entry is more important.

Accessibility

The native slider reports its label and current value. A visible formatted value helps people understand the current setting.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package