Skip to content
Zuno UI
Explore components
EXPLORE
Actions
Forms
Layout
Navigation
Data display
Feedback
Overlays
RESOURCES
Components/PasswordInput

PasswordInput

Password input with show/hide that never loses focus.

Installation

Run it from the root of a project already set up with zunoui init.

npx zunoui@latest add password-input

Dependencies

What add password-input installs alongside the component. The CLI skips any you already have in a compatible version.

ZUNO registry

Examples

1 examples · 1 component
password-input

Show or hide

The button reveals the password without losing context.

API reference

Forwards props and ref to the container element; it only adds composition utilities.

PropTypeDefault
...InputProps

Accepts every Input prop, including value/defaultValue.

——
autoComplete

Suggested: current-password or new-password.

string—

States

The states that apply to this component and their visual treatment.

StateTreatment
HiddenThe value is masked by default.
VisibleThe button toggles visibility (aria-pressed).
Focus preservedToggling does not move the field's focus or cursor.
Inherits from InputRest, focus, invalid and disabled as in Input.

Accessibility

The button toggles aria-pressed and its aria-label describes the action (show/hide).

Showing the password does not move focus out of the field; the value and cursor are preserved.