Forms
PIN Input
OTP-style PIN input with configurable digit count, auto-advance, backspace support, and paste handling.
Quick Preview
Installation
# No extra dependencies
// Copy component fromsrc/components/forms/PinInput.tsx
Usage
import PinInput from '@/components/forms/PinInput'<PinInputlength={6}label="OTP Code"onComplete={(pin) => submitOtp(pin)}/>
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 PIN digits |
label | string | - | Label above the input |
onComplete | (pin: string) => void | - | Called when all digits are filled |
className | string | - | Additional CSS classes |