Slider
Select a value from a continuous range.
Default
The label and current value sit inside the track. Slider is controlled: pass value and onChange.
Unit
unit is appended to the displayed value, like 8s or 1.2×.
Tick labels
Pass tickLabels to name points along the scale. They spread evenly under the track, first to last.
Precise
Balanced
Creative
Midpoint
midpointValue pins a value to the centre of the track, so 1× sits in the middle of a 0.5×–2× range.
Secondary
A neutral-100 track with a neutral-700 fill and white handle, for sliders on a white panel.
Best practices
When to use
- Use for an approximate continuous setting where feel matters more than an exact number, such as stability, temperature, or speaking rate.
- Use Input, Select, or Radio when people need a precise value or must compare a few fixed options.
Behavior
- Slider is controlled: pass value and onChange.
- Use a step that matches the precision people can control, like 0.01 for 0–1 or 1 for seconds.
- Add unit (“s”, “×”) when the number alone is ambiguous, tickLabels to name the ends and middle of a scale, and midpointValue when the neutral value is not the arithmetic middle (1× in 0.5×–2×).
- Use variant="secondary" on white panels; primary is a white track for tinted panels.
Content
- Keep the label to one or two words; it sits inside the track beside the value.
Accessibility
- Support keyboard increment, decrement, Home, and End actions, and expose the current numeric value.