Mobile › Inputs

PasswordField

A password field with a Show / Hide button inside it. Autofill and password managers keep working.

Installation

npx expo install plankui-mobile react-native-safe-area-context expo-haptics

Usage

import { PasswordField } from "plankui-mobile";

const [password, setPassword] = useState("");

<PasswordField value={password} onChangeText={setPassword} />
<PasswordField label="New password" kind="new" hint="Use 8 or more characters." />

API reference

PropTypeDefaultDescription
labelstring"Password"Always visible above the field.
kind'current' | 'new''current'new asks password managers to suggest a password; current offers the saved one.
hintstring–Help text under the field.
errorstring–Shown instead of the hint and read out by screen readers.
...TextInputPropsTextInputProps–Any React Native TextInput prop except secureTextEntry.