Skip to content

OTP resend

A countdown that turns into a resend action. The caller owns the time.

OTP resend OTP resend

val countdown = rememberJengaCountdown(
    duration = 30.seconds,
)
val remainingText = JengaOtpResendDefaults.formatRemaining(
    remaining = countdown.remaining,
)
JengaOtpResend(
    remaining = countdown.remaining,
    onResend = { countdown.restart() },
    countdownText = "Resend code in $remainingText",
    resendText = "Resend code",
)