Skip to content

Password field

Accepts a password, with a button to show or hide it.

password-field-basic-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Disabled

password-field-disabled-demo.tsx

New password

Set autoComplete="new-password" and minLength. Also install Form.

Use 8 or more characters.
password-field-demo.tsx

API reference

vip/ui adds or changes the props below. For all other props, see React Aria TextField (opens in a new tab).

label: stringRequired
Visible label for the field.
size: "xs" | "sm" | "md" | "lg" | "xl" = "lg"
Sets the size of the field and of the reveal button.
description: string
Help text below the field.
placeholder: string
Input placeholder.
autoComplete: string = "current-password"
Use new-password when creating a credential.