AppOtpVerification

fun AppOtpVerification(modifier: Modifier = Modifier, otpText: String, otpCount: Int = 6, isError: Boolean = false, errorText: String? = null, onOtpTextChange: (text: String, isComplete: Boolean) -> Unit, onResendClick: () -> Unit)

A custom OTP (One-Time Password) verification component. It displays a series of boxes for digit input and includes a resend timer.

Parameters

modifier

The Modifier to be applied to the component.

otpText

The current text value of the OTP.

otpCount

The number of digits in the OTP.

isError

Whether the component should display an error state.

errorText

Optional error message to display when isError is true.

onOtpTextChange

Callback when the OTP text changes. Receives the text and whether it's complete.

onResendClick

Callback when the resend button is clicked.