OTPInput.
A grouped verification code input supporting paste and autofill.
0 of 6 digits entered
The preview uses the actual shared component, including your current theme, rounding, border and motion preferences.
Props & API reference
Parameters available in the shared component, including value types, requirements and accepted options.
| Parameter | Type | Required | Default | Possible values | Description |
|---|---|---|---|---|---|
value | string | Yes | — | — | Controlled numeric verification code. |
onValueChange | (digits: string) => void | No | — | — | Called as digits are entered or pasted. |
length | number | No | 6 | — | Expected digit count (1–12). |
label | string | No | Verification code | — | Accessible field name. |
onComplete | (code: string) => void | No | — | — | Fires when the code reaches full length. |
disabled | boolean | No | false | true · false | Disable code input. |
className | string | No | — | — | Additional CSS class on the outer component element. |