ONONC

Elastic Slider

An accessible slider that stretches elastically when dragged past its ends.

pointera11yspring

Styled with ONONC's design tokens shadcn add installs them for you.

Customize

Range

Value50
Min0
Max100
Step1

Style

Tick marks0
Show icons
Fill color

Motion

Elastic overflow60px
Stiffness300
Damping30

Props

PropTypeDefaultDescription
defaultValuenumber50Initial value (uncontrolled).
minnumber0Minimum value.
maxnumber100Maximum value.
stepnumber1Increment per key press / drag snap.
markersnumber0Number of evenly spaced tick marks; 0 renders none.
showIconsbooleantrueFlank the track with min/max volume icons.
accentstring"#8b5cf6"Fill color (hex).
overflownumber60Max pixels the track elastically stretches past an end.
stiffnessnumber300Spring stiffness for the elastic stretch.
dampingnumber30Spring damping for the elastic stretch.
onValueChange(value: number) => voidCalled with the new value whenever it changes.
labelstring"Elastic slider"Accessible name for the slider.