Number Input
A numeric field with optional increment / decrement buttons. Arrow keys step the value, blur clamps to the configured range.
Installation
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | — | Controlled value. |
onChange | (value: number) => void | — | Called as the user types or uses the steppers. |
min / max | number | — | Range bounds. Steppers disable when limits are reached. |
step | number | 1 | Step size for keyboard arrows and stepper buttons. |
showControls | boolean | true | Render +/- buttons. Set to false for a plain numeric input. |
allowNegative | boolean | true | Allow leading minus. |
clampOnBlur | boolean | true | Clamp out-of-range values to min/max when the field blurs. |