Skip to content
satin

Password input

A password field with a show and hide button.

At least 12 characters.

Installation

Terminal
npm i @uisatin/ui
Import
import { PasswordInput } from '@uisatin/ui/password-input'

About 16.1 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.

First time with Satin? Set it up once, styles and fonts included, with the installation guide.

API Reference

The PasswordInput component is an Input of type password with a show and hide button. It takes every Input prop.

PropTypeDefault
size
"sm""md""lg"
"md"
visible
boolean
—
onVisibleChange
(visible: boolean) => void
—
autoComplete
string
"current-password"

Accessibility

An Input of type password. The show and hide button is named "Show password" or "Hide password" and has aria-pressed; it keeps focus and the caret where they are. autoComplete is current-password by default; pass new-password on sign-up so password managers suggest one.

KeyAction
EnterorSpaceOn the button: shows or hides the password.