Skip to Content
Documentation
Saas UI
Get Pro
Getting started
Components
Overview

Password Input

Used to collect passwords.

Usage

import { PasswordInput } from '@saas-ui/react/password-input'
<PasswordInput />

Examples

Sizes

Use the size prop to change the size of the password input.

info
The password input sizes are mapped to the Input component sizes.

Controlled

Use the value and onChange props to control the current page.

Hook Form

Here's an example of how to use the PasswordInput component with react-hook-form.

Controlled Visibility

Use the visible and onVisibleChange props to control the visibility of the password input.

Password is hidden

Props

Root

PropDefaultType
defaultVisible false
boolean

The default visibility state of the password input.

rootProps
InputGroupProps

visible
boolean

The controlled visibility state of the password input.

onVisibleChange
(visible: boolean) => void

Callback invoked when the visibility state changes.

visibilityIcon
{ on: React.ReactNode; off: React.ReactNode }

Custom icons for the visibility toggle button.

Previous

Pagination

Next

Pin Input