Component
A range input for selecting numeric values. Supports single value, range selection, step marks, and both horizontal and vertical orientations.
View component changelogImport all parts of the component and piece them together
The root Slider component.
| Prop | Type | Default |
|---|---|---|
value | number | number[] | -- |
defaultValue | number | number[] | -- |
min | number | 0 |
max | number | 100 |
step | number | 1 |
pageStepMultiplier | number | 10 |
orientation | enum | horizontal |
disabled | boolean | false |
showStepMarks | boolean | false |
formatValue | function | -- |
onValueChange | function | -- |
onValueCommit | function | -- |
| Shortcut | Description |
|---|---|
Tab | Moves focus to the slider thumb. |
ArrowRight | Increases the value by one step in left-to-right layouts and decreases it in right-to-left layouts. |
ArrowUp | Increases the value by one step. |
ArrowLeft | Decreases the value by one step in left-to-right layouts and increases it in right-to-left layouts. |
ArrowDown | Decreases the value by one step. |
Home | Moves the focused thumb to the minimum value. |
End | Moves the focused thumb to the maximum value. |
PageUp | For a single-thumb Slider, increases the value by step multiplied by pageStepMultiplier. |
PageDown | For a single-thumb Slider, decreases the value by step multiplied by pageStepMultiplier. |
| Reference | What Rad UI follows |
|---|---|
Uses slider semantics on each focusable thumb with value range attributes, orientation, and optional aria-valuetext from formatValue. |