When to use it
The application verifies codes and owns submission. Normalize localized digit input into ASCII; reject invalid or excess input without truncating. Never send or persist credentials from the component.
Enter numeric verification codes with native paste and autofill integration.
Native example
The application verifies codes and owns submission. Normalize localized digit input into ASCII; reject invalid or excess input without truncating. Never send or persist credentials from the component.
LumenInputOTP(
label = "Verification code", value = code,
onValueChange = { code = it }, length = 6,
description = "Enter or paste six digits"
)Reference
The primary shared and platform-specific options exposed by LumenInputOTP.
| API | Values or type | Default | Description |
|---|---|---|---|
| label / value / onValueChange | String / String / (String) -> Unit | Required | Names the field and controls an ASCII digit value. |
| modifier | Modifier | Modifier | Applies layout and semantics. |
| length | Int | 6 | Sets a bounded code length from one through twelve. |
| description / errorMessage | String? | null | Provides translated help or validation. |
| masked | Boolean | false | Hides displayed digits and applies password semantics. |
| onComplete | ((String) -> Unit)? | null | Reports a newly completed edit without verifying or submitting. |
| enabled / readOnly | Boolean | true / false | Controls native editing. |
Native behavior
The application verifies codes and owns submission. Normalize localized digit input into ASCII; reject invalid or excess input without truncating. Never send or persist credentials from the component.
Uses one native input for paste, selection, deletion, and SMS code autofill; supports errors and optional masking.
Shared component