Slider
Displays a slider built on the Base UI Slider primitive, for picking a single value or a range with keyboard and pointer.
Installation
Bash
Usage
Range
Pass an array to defaultValue (or value) to render one thumb per value.
Each thumb is indexed automatically in the order its value appears in the
array.
Examples
Vertical
Multiple thumbs
One thumb per array entry — three values give a three-thumb slider.
Disabled
API reference
Slider
Extends the
Base UI Slider Root —
all its props apply; the track, range indicator, and thumbs are built
in. Pass value/defaultValue as an array: one thumb renders per
entry, so [40] is a single-value slider and [20, 60] a range. With
no value at all, a full-range two-thumb slider is rendered.
| Prop | Type | Default |
|---|---|---|
value | number[] | — |
defaultValue | number[] | — |
min / max | number | 0 / 100 |
step | number | 1 |
orientation | "horizontal" | "vertical" | "horizontal" |