Skip to content

OTP field

A one-time-code input drawn as cells. Paste, SMS autofill and screen readers treat it as one field.

OTP field OTP field

var code by remember {
    mutableStateOf(
        value = "",
    )
}
JengaOtpField(
    value = code,
    onValueChange = { code = it },
    contentDescription = "Verification code",
    onComplete = {
        verify(
            it,
        )
    },
)