UI
InputOTP
One-time password input with individual character boxes, paste handling, and keyboard navigation.
Quick Preview
Enter 6-digit code
Installation
# No extra dependencies
// Copy component fromsrc/components/ui/InputOTP.tsx
Usage
import InputOTP from '@/components/ui/InputOTP'<InputOTPlength={6}onComplete={(code) => verifyOtp(code)}/>
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
length | number | 6 | Number of OTP digits |
onComplete | (otp: string) => void | - | Called when all boxes are filled |