Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
FormsAndroid

Password field

Enter passwords with transient visibility and native credential autofill hints.

Public APILumenPasswordFieldAndroid / Compose

Native example

Use Password field

Keep authentication and credential lifecycle in the application. Visibility is transient and never saved. Use newPassword for registration; provider autofill needs device configuration.

Password field rendered in the Android phone emulator Lumen playground
Captured exampleAndroid phone emulator
kotlin
LumenPasswordField(
    label = "Password", value = password,
    onValueChange = { password = it },
    showLabel = "Show password", hideLabel = "Hide password"
)

Reference

Public API

The primary shared and platform-specific options exposed by LumenPasswordField.

APIValues or typeDefaultDescription
label / value / onValueChangeString / String / (String) -> UnitRequiredNames the native field and controls its value.
modifierModifierModifierApplies layout and semantics.
description / errorMessageString?nullProvides translated help or validation.
showLabel / hideLabelStringShow password / Hide passwordNames the visibility action.
newPasswordBooleanfalseUses Android new-password instead of existing-password autofill hints.
onSubmit(() -> Unit)?nullHandles the IME Done action without automatic authentication.
enabled / readOnlyBooleantrue / falseControls editing and visibility actions.

Native behavior

Design and accessibility

When to use it

Keep authentication and credential lifecycle in the application. Visibility is transient and never saved. Use newPassword for registration; provider autofill needs device configuration.

Accessibility

Preserves password semantics and native autofill hints; labels visibility actions and hides on blur or disabled state.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module