Studiov0.6.0

InputOTP

Tier 1shadcn
Inputs

A one-time password input with individual character slots for verification codes.

Live Preview

Code

import { InputOTP } from "@regen/ui";

<InputOTP />

Props Inspector

No configurable props for this component.

Documentation

Use Cases

  • Email verification codes
  • 2FA authentication
  • PIN entry

Do

  • Set maxLength to match expected code length
  • Auto-focus the first slot on mount

Don't

  • Don't use for passwords — use type='password' Input
  • Don't use fewer than 4 slots