Search

Search components and blocks

Sign in

Slider

The Radix Slider with a thumb that grows on drag and hover instead of staying a fixed size — pricing calculators, usage limits, filters.

pnpm dlx shadcn@latest add @ditherui/slider

Install

$ pnpm dlx shadcn@latest add @ditherui/slider

Props

valuenumber[]—
defaultValuenumber[][min, max]
minnumber0
maxnumber100
stepnumber1
variant"default" | "slosh""default"
disabledbooleanfalse

Slosh Slider

Pro

A slider whose fill has weight: drag fast and it sloshes past the handle, then settles back.

pnpm dlx shadcn@latest add @ditherui/slider

Props

valuenumber[]—
defaultValuenumber[][min, max]
minnumber0
maxnumber100
stepnumber1
variant"default" | "slosh""default"
disabledbooleanfalse

When to use the slider

Use sliders for ranges such as pricing calculators, usage limits and filters. The thumb grows on drag and hover.

  • Open the CLI tab on any preview above for the exact shadcn command. The source is copied into your project, so you can edit it like any other file.

Suggested components