Grid

OTP & Two-Factor Verification Form

6-digit authentication code input with paste handling, slot grouping, resend cooldown timer, and auto-submit.

Preview

Two-Factor Authentication

We sent a 6-digit verification code to a***x@company.com.

Didn’t receive the code?
Tip: Enter any 6 digits (e.g. 123456) to succeed, or 000000 to test rejection handling.
Interactive responsive preview
Drag handles on right and bottom to resize

Overview

The OTP (One-Time Password) pattern provides a seamless, secure authentication surface. Using @/components/ui/input-otp (built on top of input-otp), it handles individual digit focus, paste from clipboard, arrow key navigation, and automated form dispatch upon entering the 6th character.

Features

  • Slot Division: Formatted into two groups of 3 slots separated by an explicit divider for rapid visual verification.
  • Auto-Submit on Complete: Triggers the verification transition as soon as the final slot is filled.
  • Resend Cooldown Timer: Protects backend SMS / Email delivery services from rate-limit abuse by enforcing a 45-second delay.
  • Keyboard Navigation: Full support for backspace, paste across slots, and arrow navigation.

On this page