← Inventory
Slider
Selects a single value or a range from a continuous scale, rendering one draggable thumb per value. Import from "@desk/ui/components/slider". Built on Radix UI primitives for accessible behavior.
Usage
import { Slider } from "@desk/ui/components/slider";Best practices
Pass
value/defaultValueas an array — one number per thumb; a two-element array renders a range and the thumb count follows the array length.Set
min/max/stepto real domain bounds (defaults 0–100) rather than rescaling values yourself afteronValueChange.For exact numeric entry use
Input type="number"; reserveSliderfor approximate selection along a continuous range.
Props
Also exports
- component
Slider