Slider
Inputshadcn/uiPicks a number or a range by dragging: an amount, a price filter, a volume. Pass two values for a range.
When to use
- Show the current value as text next to the label.
- Pair it with an Input when exact values matter.
- Don't use it for fewer than four choices; use Tabs or RadioGroup.
Accessibility
- Role
- slider
- Keyboard
- Arrow keys move one step. Page Up and Page Down move ten steps. Home and End jump to min and max.
- Notes
- Give each thumb an aria-label, e.g. 'Minimum price'.
Props
value / onValueChangenumber[] / (value: number[]) => voidControlled; one number for a single value, two for a range.
defaultValuenumber[]Uncontrolled starting value.
min / max / step= 0 / 100 / 1numberBounds and increments.
Prompt for your agent
Use the UnbuiltUI Slider. Call unbuilt_get_component("Slider") first and follow its spec: variants, states, usage rules and accessibility.
unbuilt_get_component returns
0 variants3 states3 props3 usage rules4 a11y notes5 tokens1 example
Add it with shadcn
$
npx shadcn add https://unbuiltui.com/r/slider.jsonTokens · 5
bg.subtlebg.raisedaccent.defaultborder.defaultshadow.raised