Simulates prefers-reduced-motion for the demo. Off follows your system setting.
Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.
1
A slider made of tick marks that swell under your pointer.
npx shadcn@latest add ikislay/pixel-ui/sliderimport { Slider } from "@/components/ui/slider"export function Demo() {return <Slider aria-label="Volume" defaultValue={40} formatValue={(v) => `${v}%`} />}
1// Loading…
Options you can pass to customize this component.
valuenumberControls the value. Leave it unset to let the slider manage itself.
defaultValuenumberThe starting value when uncontrolled. Defaults to min.
minnumberThe lowest value.
maxnumberThe highest value.
stepnumberThe size of each step.
ticksnumberHow many tick marks draw the track.
formatValue(value: number) => stringFormats the number in the tag and for screen readers, for example as a percentage.
onValueChange(value: number) => voidCalled on every step while the value moves.
onFeedback(event: "select") => voidCalled at each semantic moment, for wiring sound or haptics.
classNamestringMerged onto the capsule. Other props, like aria-label, go to the inner range input.