InputNumber
A verification code input component with individual digit cells, supporting auto-focus navigation, paste, and error states.
Installation
npx chilli@latest add number-inputDefault
States
Default
Filled
3
3
3
3
Error
3
3
3
3
Disabled
Length
4 digits
6 digits (default)
API Reference
NumberInput
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | "" | The current value as a string of digits. |
onChange | (value: string) => void | — | Callback when the value changes. |
length | number | 4 | Number of digit cells to display. |
error | boolean | false | Whether to show the error state. |
disabled | boolean | false | Whether the input is disabled. |