Slider
Pick a value or range along a track.
01
Preview & playground
Edit the code — the preview updates live. Try changing props, text, or classes.
playground.tsx
render( <div className="w-full max-w-sm"> <Slider defaultValue={[40]} max={100} step={1} /> </div> )
02
Examples
Common variations — edit any of them live.
Range
Two thumbs for a min/max range.
playground.tsx
render( <div className="w-full max-w-sm"> <Slider defaultValue={[25, 75]} max={100} step={1} /> </div> )
03
Installation
Copy the source into your project with the registry CLI:
$pnpm dlx shadcn@latest add @stacklyui/sliderOr install the package and import it:
$pnpm add @stacklyui/ui motion04
Usage
Import Slider from "@stacklyui/ui" and compose it as shown in the playground above. Every interactive primitive is built on Radix, so keyboard navigation, focus management, and ARIA are handled for you.