Skip to content

TsaiOtpInput

A numeric one-time-password input rendered as individual cells.

Open live example

TsaiOtpInput(
  length: 6,
  onChanged: (value) => code = value,
  onCompleted: verifyCode,
  semanticLabel: 'Six-digit verification code',
)

length must be greater than zero. isError and isSuccess are mutually exclusive. Do not provide both controller and initialValue.