Components
GlassInputOTP
Accessible one-time-password input split into individual slots.
Preview
Usage
Props
GlassInputOTP
| Prop | Type | Default | Description |
|---|---|---|---|
maxLength | number | — | Total number of characters |
value | string | — | Controlled value |
onChange | (value: string) => void | — | Fired when the value changes |
onComplete | (value: string) => void | — | Fired when maxLength is reached |
disabled | boolean | false | Disable the input |
containerClassName | string | — | Class applied to the slots container |
GlassInputOTPSlot
| Prop | Type | Default | Description |
|---|---|---|---|
index | number | — | Zero-based index of the slot in the OTP string |
All input-otp props are also supported.