Number Input
A numerical input with optional step, min and max properties to constrain the user's entry.
Examples
Basic Number Input
<NumberInput />
With Constraints and Step
<NumberInput
min="5"
max="100"
step="5"
/>
Controlled Number Input
<NumberInput
...
value={someValue}
onChange={handleChange}
/>
Props
| Name | Type | Default Value | Required | Description |
|---|---|---|---|---|
defaultValue | string | number | No | A starting value for an uncontrolled component. | |
onChange | FormControlChangeEventHandler<HTMLInputElement, number> | No | Emit a new value when the input's value changes. | |
value | string | number | No | A current value for a controlled component. |