Ship-It Designv0.0.3
GitHub

Slider

Each example below is a real component instance — flip the theme toggle to see how it adapts.

Default#

Loading…

Live#

Loading…

Decimal#

Loading…

Props#

Props for Slider
PropTypeDefaultDescription
showValueboolean | undefinedShow the numeric value to the right of the track.
widthstring | number | undefined240Pixel width or any CSS length. Defaults to `240`.
thumbLabelsreadonly string[] | undefinedPer-thumb accessible names for multi-thumb (range) sliders. The label at each index is forwarded to the corresponding `<RadixSlider.Thumb>`. When omitted, every thumb falls back to `aria-label`/`aria-labelledby` (or the literal `'Value'` when neither is provided).
valuenumber | number[] | undefinedControlled value. Accepts a scalar for single-thumb sliders or an array for multi-thumb (range) sliders. The shape passed in mirrors the shape passed back to `onValueChange`.
defaultValuenumber | number[] | undefinedUncontrolled initial value. Same scalar/array semantics as `value`.
onValueChange((next: number | number[]) => void) | undefinedFires when the value changes. The argument shape mirrors the input shape: if `value`/`defaultValue` is a scalar, `next` is a scalar; if it's an array, `next` is an array.