StealThis .dev

Number Input

Numeric input with increment/decrement stepper buttons, min/max/step support, and keyboard navigation.

Open in Lab
css vanilla-js
Targets: JS HTML

Code

Number Input

Accessible numeric stepper input with increment and decrement buttons, respecting min, max, and step constraints.

Variants

VariantDescription
DefaultBasic stepper with no constraints
Min / MaxClamped range with buttons disabled at boundary
DisabledNon-interactive, visually dimmed state

Implementation

Native <input type="number"> is hidden; value is managed in JS and displayed in a custom <input type="text"> to avoid browser-native spinner UI. Arrow-key and direct typing are both supported with clamping.