Skip to Content
Forms & Inputs@hacline/ui/password-input

PasswordInput

Password input field with an accessible visibility toggle.

Usage

Omit children for a ready-to-use password field with an automatic icon toggle. Configure browser autofill hints via autoComplete.

Click the eye icon to toggle visibility without losing focus.

Form Validation

Pass required, pattern, and inputTitle directly to PasswordInput for native form validation.

Use a mix of letters, numbers, and symbols.

StrengthEnter a password
  • At least 8 characters
  • One uppercase letter
  • One number
  • One special character

Variants, Sizes & Prefix

Customize appearance with variant ("default" / "filled"), size ("sm" / "md" / "lg"), leading prefix icons, or showToggle={false}.

Parts

Pass custom children when you need full control over inner parts.

PartDescription
PasswordInputControl
The native <input>. Its type follows whether the password is shown, and form attributes come from <PasswordInput>.
PasswordInputToggle
Shows and hides the password. Name it by what it does, like "Show password": it's a toggle button, and aria-pressed says whether the password is shown.

Props

Prop

Type

View UI SDK parts and state attributes.