Slider
A range input with track and thumb.
s0 add slider
Usage
@State private var volume = 0.5
S0.Slider("Volume", value: $volume)S0.Slider("Brightness", value: $brightness, in: 0...100, step: 5)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| label | String? | nil | Optional label above the slider. |
| value | Binding<Double> | — | Binding to the current value. |
| range | ClosedRange<Double> | 0...1 | Allowed value range. |
| step | Double? | nil | Step increment. Continuous when nil. |