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

Nexus UI

Scrub Inputs, animated React component

Design-tool number fields: drag a label sideways to change the value, with Shift for big steps and Alt for fine ones. A badge shows how far you have moved, then reports the change when you let go.

  • 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.

px
°
%
Drag a label sideways. Shift for big steps.

Props

PropTypeDefaultWhat it does
label—ScrubInput: field name; dragging it changes the value.
value—ScrubInput: the current value (controlled).
onChange—ScrubInput: called with each new value while dragging, typing or using the arrow keys.
min—ScrubInput: lowest allowed value.
max—ScrubInput: highest allowed value.
step1ScrubInput: change per two pixels of drag and per arrow key press.
unit""ScrubInput: suffix shown after the number and in the change badge.
accent"#0071e3"Both: badge colour while dragging; ScrubInputs also starts its sample shape's gradient with it.
autoplayfalseScrubInputs: changes the three sample fields by itself until someone touches them.