Skip to content

OTP

OTP

OTP (One-Time Password) provides a secure input dialog for collecting authentication codes with automatic countdown timer and resend functionality.

PropertyValue
OTP Digits4-6 (configurable)
Input Box40-48px square
Spacing8-12px between boxes
FontLarge, monospace
Timer Duration30-60 seconds (configurable)

Empty input boxes, waiting for user input

Empty State

Partially filled, submit button disabled

All filled, submit button enabled

Red borders, error message shown

Phone number displayed with masked middle digits:

OriginalDisplayed
08123456789081****6789
628123456789628****56789
PhaseAppearance
Active”Resend in 30s”
Finished”Resend OTP” (clickable)
DisabledGreyed out during countdown
  • Two-factor authentication flows
  • Phone number verification
  • Transaction confirmation
  • Secure code entry
✅ Do❌ Don’t
Show masked phone for contextMake countdown too short (< 30s)
Display clear error messagesClear code on error
Handle network errors gracefullyHide timer from user
Provide reasonable countdown durationSkip resend functionality
ErrorMessage
Wrong code”Invalid OTP. Please try again.”
Expired”OTP has expired. Please request a new one.”
Network error”Connection error. Please try again.”