Components
Input OTP
A one-time password input with individual character slots, built on input-otp.
Preview
Installation
bunx shadcn@latest add @sft-ui/input-otpWithout Separator
API Reference
See the input-otp documentation for the API reference.
A one-time password input with individual character slots, built on input-otp.
'use client'; import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from '@/registry/san-francisco/ui/input-otp'; export default function InputOtpDemo() { return ( <InputOTP maxLength={6}> <InputOTPGroup> <InputOTPSlot index={0} /> <InputOTPSlot index={1} /> <InputOTPSlot index={2} /> </InputOTPGroup> <InputOTPSeparator /> <InputOTPGroup> <InputOTPSlot index={3} /> <InputOTPSlot index={4} /> <InputOTPSlot index={5} /> </InputOTPGroup> </InputOTP> ); }
bunx shadcn@latest add @sft-ui/input-otp'use client'; import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from '@/registry/san-francisco/ui/input-otp'; export default function InputOtpDemoWithoutSeparator() { return ( <InputOTP maxLength={4}> <InputOTPGroup> <InputOTPSlot index={0} /> <InputOTPSlot index={1} /> <InputOTPSlot index={2} /> <InputOTPSlot index={3} /> </InputOTPGroup> </InputOTP> ); }
See the input-otp documentation for the API reference.