OTPDisplayBlock

Form

Styled OTP display block with segmented digit cells, expiration timer, resend action, and auto-submit on completion

OTPDisplayBlock Component

Structured OTP entry block for authentication and verification flows.

Basic Usage

Default six-digit verification input.

Implementation Notes

Keep setup minimal so teams can adopt the component quickly.

  • • Use defaults first before introducing variants.
  • • Keep labels and helper text explicit.
  • • Verify accessibility behavior early.

Normal Usage

Shorter OTP modes for quick verification.

Implementation Notes

This pattern maps to everyday product screens and forms.

  • • Use consistent variant and size tokens.
  • • Pair with helper text for clarity.
  • • Prefer predictable controlled behavior.

Advanced Usage

Use secure masking and completion callbacks.

Implementation Notes

Advanced mode should compose cleanly with app state and callbacks.

  • • Wire callbacks for analytics and persistence.
  • • Tune layout for dense, data-heavy views.
  • • Document edge-case behavior in examples.

Real-Life Use Cases

Common for login MFA and account recovery verification.

Code expired. Please request a new one.

Code expired. Please request a new one.

Too many attempts. Try again in 30 seconds.

Too many attempts. Try again in 30 seconds.

Implementation Notes

Show how the component fits real workflows, not isolated UI demos.

  • • Model practical business scenarios.
  • • Include realistic content and labels.
  • • Highlight production-friendly defaults.

View on GitHub

See the full source code on GitHub