Password input
A password field with a show and hide button.
At least 12 characters.
Installation
npm i @uisatin/uiimport { 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.
npx shadcn@latest add https://uisatin.dev/r/password-input.jsonAdds password-input.tsx, button.tsx, form-field.tsx, input.tsx, labels.tsx and spinner.tsx to components/ui and installs iconoir-react.
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.
| Prop | Type | Default |
|---|---|---|
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.
| Key | Action |
|---|---|
| EnterorSpace | On the button: shows or hides the password. |
Something wrong or missing on this page?
Report a problemSuggest an improvement