Password Input
A password field with a show/hide toggle, built on InputGroup. Pair it with password-rules when creating a password.
Overview
- Toggle: a button named by
toggleLabel(default "Show password"; pass a translation as needed) whosearia-pressedreports whether the text is revealed. - Visibility: uncontrolled (
defaultRevealed) or controlled (isRevealed/onRevealedChange). - Input: the rest of the props go to the input, so it works inside a react-aria
TextField(label, description, validation) and takesautoComplete="current-password"or"new-password".
Hides Edge's built-in reveal button.
Installation
CLI
Manual
- 1
Register the @fma-ds namespace in components.json (once)
- 2
Add the item
Files land in
components/fma-ds/password-input.tsx; npm and registry dependencies are installed along with them.
Dependencies
- npm
- cn@^0.5.0lucide-react@^1.61.0
- Registry
- @fma-ds/input-group