Input OTP
Accessible one-time password input.
Preview
Installation
bash
npx auralix-ui add input-otpUsage
OTP Input
tsx
import { InputOTP, InputOTPGroup, InputOTPSlot } from "@/components/ui/InputOTP";
<InputOTP maxLength={6}>
<InputOTPGroup>
<InputOTPSlot index={0} />
<InputOTPSlot index={1} />
<InputOTPSlot index={2} />
</InputOTPGroup>
</InputOTP>Props
| Name | Type | Default | Description |
|---|---|---|---|
maxLength | number | 6 | Number of characters. |
Variants
Numeric (6-digit)
Short (4-digit)
With Separator
-
On this page