

Every state


default


focus


partial


filled


error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "verification-code" | Id of the real input; the label, description and error point at it. |
| name | string | "code" | Form field name. |
| label | string | "Verification code" | Visible label. |
| description | string | – | Help text under the boxes. |
| length | number | 6 | Number of digits. |
| defaultValue | string | – | Starting digits; non-digits are dropped. |
| error | string | – | Error message (e.g. a wrong code); marks every box and clears once the code is edited. |
| disabled | boolean | – | Disables the field. |
| autoFocus | boolean | – | Focuses the code on mount. |
| onComplete | (code: string) => void | – | Fires once every box is filled, by typing, paste or autofill. |
| className | string | – | Extra classes on the outer Field. |


