KasyKasy

Text Field OTP Group

Live preview and documentation for the Text Field OTP Group component.

Preview

componentPreview.loading

About

A "form field" version of KasyTextFieldOTP: title + code cells + description/error + an optional resend row with a countdown. Use it for standalone code verification screens (outside of a bottom sheet).

  • title / description: optional header above the cells.
  • length: number of digits in the code (defaults to 6).
  • separatorAfterIndex: inserts a visual separator after that index (e.g. 2 splits 123 456).
  • errorText: shows an error message below the cells and marks the field as invalid.
  • enabled: disables interaction.
  • onChanged / onCompleted: callbacks for typing and for a completed code.
  • resendCooldown: countdown duration before the "Resend code" link becomes clickable again; omit it to leave the link active from the start.
  • onResend: shows the resend row (hidden entirely if null).

Uses KasyTextFieldOTP internally for the cells and KasyLink for the resend link.

Last updated on 08/23/2026

On this page