Early accessFull site coming soon. Pro is $49.99 a year. See pricing ›

Nexus UI

Bending Rail, animated React component

A slider whose rail follows the knob. Pull the knob off the groove and the rail bends toward it while a ghost knob keeps the value; let go and it twangs straight on a spring.

  • Pro
  • Inputs & Controls
  • Spring

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

Volume40%
Pull the knob up or down, then let go.

Props

PropTypeDefaultWhat it does
label"Volume"Label shown above the rail and used as the slider's accessible name.
min0Lowest value.
max100Highest value.
defaultValue40Starting value.
unit"%"Suffix shown after the value.
accent"#0071e3"Colour of the filled run, the tether and the ghost knob.
onChange—Called whenever the rounded value changes.
autoplayfalseTugs the knob around by itself until someone grabs it.