Password Input

A password field with a button that shows and hides the text.
Stable
Web
iOS
Android
@advui/core
Source

Basic

At least 12 characters.

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { Field, PasswordInput } from '@advui/core'

<Field label="Password">
  <PasswordInput />
</Field>

API reference

PasswordInput

Accepts every Input prop except `type` and `secureTextEntry`.
PropTypeDefaultDescription
visibleboolean—Whether the password is shown.
defaultVisiblebooleanfalseStarting `visible` when uncontrolled.
onVisibleChange(visible: boolean) => void—Called when the button is pressed.
toggleLabelstring'Show password'Accessible name of the button.
autoCompletestring'current-password'Use 'new-password' on sign-up forms.
size'sm' | 'md' | 'lg''md'As Input.

Accessibility

  • The button is a toggle with a fixed name ("Show password"), so its state is announced instead of a changing label: aria-pressed on web, a toggle button that reads as checked on iOS and Android.
  • Password managers and autofill see a normal password field.
Keyboard interactions
KeyAction
TabMoves from the field to the show/hide button.
Space / EnterShows or hides the password (on the button).

Platform notes

Web
The field switches between type="password" and type="text".
iOS
Uses secureTextEntry; iOS may clear the field when typing resumes after hiding.
Android
Uses secureTextEntry.
Since v0.4.0Last updated Nov 2, 2026Edit this page on GitHub