Slider

A range slider with a glossy knob and a value bubble that lifts while you drag. Keyboard and touch work too.

Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.

Slider3D props

PropTypeDefaultDescription
valuenumberControlled value.
defaultValuenumber0Initial value when uncontrolled.
onValueChange(value: number) => voidCalled with the new value whenever it changes.
minnumber0Smallest allowed value.
maxnumber100Largest allowed value.
stepnumber1Amount the value changes by per step.
disabledbooleanStops the user from changing the slider.
showValuebooleantrueShow the value bubble while dragging or focused.
formatValue(value: number) => string(v) => String(v)Turns the value into the text shown in the bubble.
aria-labelstringRequired: names the slider for screen readers.
classNamestringExtra classes added to the outer element.

More components

Guides

Start

Cards

Scenes

Controls & text

Buttons

More cards

UI elements

Form controls

App components

Text & backgrounds

Showpieces

Blocks