forms contract

OTPInput

Six-digit one-time-passcode input for 2FA / email verification.

Variants

  • six
  • four

Sizes

  • md
  • lg

Example

<OTPInput length={6} autoComplete="one-time-code" onComplete={verify} />

Usage rule

autoComplete="one-time-code" on iOS (parses SMS automatically).

The full OTPInput contract has 5 more rules, plus the do-not patterns. Get the full recipe.

Get the OTPInput contract in your project.