Skip to content

Password Input

A field for entering secure text.

Installation

Anatomy

Usage

Controlled

Use value and onChange on PasswordInputInput to control the password value.

Character count: 0

States

Disabled

Use the disabled prop to disable the password input.

The field is currently disabled.

Invalid

Use the invalid prop to mark the password input as invalid.

Please enter a valid password.

Sizes

Use the size prop to change the input height.

Small

Medium

Large

Examples

Autocomplete

Use the autoComplete prop to hint autofill behavior to the browser.

  • current-password — signing in with an existing password
  • new-password — creating or resetting a password

For signing in to an existing account.

For creating or resetting a password.

Controlled Visibility

Use visible and onVisibilityChange to control whether the value is shown.

Auto Hide

Use visible, onVisibilityChange, and a timer to hide the password again after it is revealed.

Custom Indicator

With Field

Combine with Field components, for labeled password fields with helper text.

Must be at least 8 characters.

API Reference

PasswordInput

Root component. Manages visibility and input state.

PasswordInputGroup

Wraps the input and visibility trigger.

PasswordInputInput

Password field.

PasswordInputTrigger

Button that toggles visibility.

PasswordInputIndicator

Renders different icons based on visibility. Use fallback for the hidden state and pass the visible-state icon as children.


For a complete list of props, see the Ark UI documentation.