Command Palette

Search for a command to run...

Input OTP

shadcn/ui

Accessible one-time password component with copy paste functionality.

Input OTP

import { InputOTP, InputOTPGroup, InputOTPSlot } from "@/components/optics/input-otp";<InputOTP maxLength={6}>  <InputOTPGroup>    <InputOTPSlot index={0} />    <InputOTPSlot index={1} />    <InputOTPSlot index={2} />    <InputOTPSlot index={3} />    <InputOTPSlot index={4} />    <InputOTPSlot index={5} />  </InputOTPGroup></InputOTP>

Installation

pnpm dlx shadcn@latest add @optics/input-otp

Props

<InputOTP />
Name
Type
containerClassName
string

<InputOTPSlot />
Name
Type
index
number