Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
React Native docs
FormsReact Native

Password field

Enter passwords with transient visibility and native credential autofill hints.

Public APILumenPasswordFieldReact Native

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.

View captured React Native example
Password field rendered in the Expo web renderer Lumen playground
Captured exampleExpo web renderer
tsx
import { useState } from 'react'
import { LumenPasswordField } from '@santi020k/lumen-react-native'

export function RegistrationPassword() {
  const [password, setPassword] = useState('')
  return <LumenPasswordField label="Password" value={password} onValueChange={setPassword}
    newPassword 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) => voidRequiredNames and controls secure entry.
showLabel / hideLabelstringShow password / Hide passwordNames transient visibility actions.
newPasswordbooleanfalseSelects registration autofill hints.
ref / onSubmitEditing / TextInput propsLumenTextInputRef / TextInputPropsundefinedForwards input focus and native submission events; the host authenticates.
description / errorMessagestringundefinedProvides localized supporting copy or host validation.
enabled / readOnlybooleantrue / falseBlocks changes without clearing controlled state.

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

Apple / SwiftUIAndroid / Compose
React Native docsNative primitives