Input OTP Component
A one-time password input with individual character slots. Commonly used for verification codes and two-factor authentication.
Basic 6-Digit OTP
A standard 6-digit OTP input with two groups of 3 digits separated by a dash.
Current value: (empty)
4-Digit PIN
A simple 4-digit PIN input without separators.
PIN value: (empty)
Alphanumeric Code
This OTP input accepts both letters and numbers using a custom pattern.
Alphanumeric code: (empty)
Disabled State
The OTP input can be disabled to prevent user interaction.
This input is disabled and cannot be edited.
Controlled with Verification
This example shows controlled mode with a simulated verification process when the OTP is complete. The input shows error styling when verification fails.
Current value: (empty)
Hint: Enter 123456 for successful verification.
Error State
Use AriaInvalid to display the OTP input in an error state with destructive (red) styling.
This input is in an error state.
Keyboard Navigation
The OTP input supports full keyboard navigation:
- ← / → to navigate between slots
- Backspace to clear and move to previous slot
- Delete to clear current slot
- Home / End to jump to first/last slot
- Paste a complete code to auto-fill all slots
Value: (empty)