∞ forever components

Inputs & Switches

Add Morph Stepper

An Add button morphs into a minus and plus stepper with a rolling quantity digit; press, tap or use arrow keys to change the count.

csslight complexitymoderate motionpointer+keyboardaccessible

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
1

When to use it

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Keep the set() state function, the role group and the Add to stepper width morph. Safe to change product name, price, max quantity and the accent token.

Safe to edit

  • tokens
  • labels

Keep intact

  • demo-v1 idle demo and takeover
  • theme hook
  • reduced-motion and visibilitychange guards
  • nx02- prefix

stepperadd to basketquantitybutton morphcountercommerce

More Inputs & Switches components

  • Liquid ToggleSVG liquid toggle with a goo filter, trailing droplets and a native button. First deliberate input stops the idle demo; the chosen on/off state settles fully.
  • Glow SliderCassis range slider on a native input: recessed track, a fill with a narrow emissive bloom, a domed knob and a rounded value tooltip, both with tight…
  • Spring StepperMint stepper with native minus/plus buttons and a number reel that settles with spring feedback. First deliberate input stops automatic steps; the chosen…
  • Segmented ControlRaised jade pill slides between four native segment buttons with elastic spring stretch. First input stops automatic cycling; committed selection remains.
  • Checkbox MorphThree native amber checkbox buttons animate their check strokes and expose pressed state. First input stops the demo; checked values remain.
  • Star RatingFive gold SVG star radio controls commit ratings on click or keyboard input and settle with a scale bounce. First input stops automatic sweeping.