Number Input

A numeric field with optional increment / decrement buttons. Arrow keys step the value, blur clamps to the configured range.

Installation

Props

PropTypeDefaultDescription
value
numberControlled value.
onChange
(value: number) => voidCalled as the user types or uses the steppers.
min / max
numberRange bounds. Steppers disable when limits are reached.
step
number1Step size for keyboard arrows and stepper buttons.
showControls
booleantrueRender +/- buttons. Set to false for a plain numeric input.
allowNegative
booleantrueAllow leading minus.
clampOnBlur
booleantrueClamp out-of-range values to min/max when the field blurs.