← All components
Interaction / component

Elastic Slider

A tactile value control with an elastic track that stretches at its limits.

PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • Demo.tsx contains the complete interactive example.
  • Reduced motion renders a static state. Paused, hidden and offscreen instances stop requesting animation frames.
  • Arrow keys change by stepSize; Page keys change by ten steps; Home and End select bounds. Stepping is relative to the minimum. An inverted range collapses to the minimum. Default icons are dependency-free minus and plus symbols.
React 19Pointer Events

React Bits · MIT with Commons Clause. Used with explicit project permission; see bundled notice.

Props

PropTypeDefaultDescription
defaultValuenumber50Starting value
startingValuenumber0Minimum
maxValuenumber100Maximum
isSteppedbooleanfalseSnap to steps
stepSizenumber1Step size
valuenumberundefinedControlled value; omit for internal state.
onChange(value: number) => voidundefinedReceives bounded values after pointer or keyboard changes.
labelstring"Volume"Accessible slider label.
leftIconReactNodeminus symbolLeading decorative icon.
rightIconReactNodeplus symbolTrailing decorative icon.
pausedbooleanfalseFreeze decorative motion; controls remain usable.
replayTokennumber0Change to reset decorative motion.
classNamestring''Additional outer classes.