Input OTP

One-time password input with auto-focus and paste support.

1<InputOTP length={4} onComplete={(otp) => console.log(otp)} />
2<InputOTP length={6} className="gap-3" />

Installation

npx zeroui@latest add input-otp

Props

nametypedefaultdescription
lengthnumber6-
onComplete(otp: string) => void--
onChange(otp: string) => void--
classNamestring""-