Back to components
UI component
OTP Input
One-time password input with individual digit boxes, auto-advance, and paste support.
Install
What it does
- Individual digit input boxes (default 6 digits)
- Auto-advance to next field on entry
- Auto-backspace to previous field
- Paste support for OTP codes
- Configurable digit count
When to use
Use it
OTP verification screens, 2FA codes, phone verification, magic link code entry.
Skip it
Regular text or password input (use the Input component instead).
Files & routes added
- components/ui/otp-input.tsx