Forms
Slider
Selects numeric values or ranges along a bounded track.
Usage
Examples
Audio settings
Adjust playback volume with the keyboard or pointer.
Control sizes
Ranges and orientation
Permissions and validation
Ticks and thumb values
Optional ticks follow step. Values can appear inside the thumb or above the track.
Recommendations
| Guidance | Practice |
|---|---|
| Do | Show the current value and units. Give each thumb a name when selecting a range. |
| Do | Use getAriaLabel to name each thumb in a range. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | Use Number Field when exact entry matters more than relative adjustment. Sliders need meaningful bounds. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Controlled value of the slider. |
| | — | Initial uncontrolled value of the slider. |
| | 0 | Minimum allowed value. |
| | 100 | Maximum allowed value. |
| | 1 | Stepping interval for value changes. |
| | "horizontal" | Axis orientation of the slider track. |
| | false | Prevents interaction and applies disabled styling. |
| | false | Indicates validation failure. |
| | "default" | Visual size variant affecting track thickness and thumb dimensions. |
| | — | Callback fired when the slider value changes. |
| | — | Callback fired when a value change is committed. |
| | — | Function deriving accessible names for individual thumbs by index. |
| | "div" | Root slider container coordinating values, context, and thumb anatomy. |
| | "div" | Interactive layout wrapper managing track positioning and touch targets. |
| | "div" | Geometric track along which the thumbs and indicator move. |
| | "div" | Visual fill bar representing selected progress or range span. |
| | "div" | Movable handle supporting pointer and keyboard value adjustment. |
| | "label" | Accessible label bound to the slider control. |
| | "output" | Formatted text representation of the current slider value. |
| | — | Low-level Base UI slider primitive namespace. |
| | false | Show dots at step intervals. Native step snaps pointer and keyboard changes. |
| | false | Show each formatted value inside its thumb. Uses format and locale. |
| | "edge" | Keep thumbs inside track edges by default. |
| | — | Content appears above the default control. Explicit SliderControl children replace default anatomy. |
| | "en-US" | Stable formatting locale for server and client hydration. Pass an explicit locale for translated values. |