Components › Forms
Input OTP
One-time code entry with auto-advance, paste support and grouped cells.
Installation
npx plankui@latest add input-otpUsage
import { InputOtp } from "@/components/ui/input-otp";
<InputOTP length={6} groupSize={3} onComplete={verify} />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| length | number | 6 | Number of cells. |
| groupSize | number | Insert a gap after this many cells. | |
| value / onChange | string / (v) => void | Controlled value. | |
| onComplete | (code: string) => void | Called when every cell is filled. | |
| invalid | boolean | false | Error style. |