PasswordInput
A password field with a built-in show or hide toggle, sane autofill defaults, and full FormField wiring.
PasswordInput is Input preconfigured for secret entry. It masks characters by default, disables autocapitalisation and autocorrect, sets autoComplete="password" so the platform credential manager kicks in, and renders a Show / Hide toggle in the trailing slot. Pass hideToggle to render a pure masked field with no toggle, or defaultMasked={false} to start unmasked.
Import
import { PasswordInput } from '@mindees/ui';
Usage
<PasswordInput value={password} onChangeText={setPassword} placeholder="Password" />
Without the toggle, e.g. for a confirm-password field:
<PasswordInput value={confirm} onChangeText={setConfirm} hideToggle />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
defaultMasked | boolean | true | Initial visibility state. When false, the field starts in plain text. |
hideToggle | boolean | false | Hides the Show / Hide button, leaving a pure masked input. |
Inherits all InputProps except secureTextEntry (controlled internally) and trailing (occupied by the toggle). That includes size, leading, invalid, disabled, plus every TextInputProps value such as value, onChangeText, placeholder, and autoComplete.
Accessibility
The toggle is a Pressable with accessibilityRole="button" and an accessibilityLabel that swaps between "Show password" and "Hide password" so VoiceOver and TalkBack announce the action it will perform. The underlying input is Input, so when nested in a FormField it picks up accessibilityLabelledBy, accessibilityDescribedBy, aria-invalid, and aria-required through useFormFieldA11y. The autoComplete="password" default also lets password managers and platform keystores announce themselves alongside the field.