fma-ds

Password Input

A password field with a show/hide toggle, built on InputGroup. Pair it with password-rules when creating a password.

FormsoriginalMITChangelogRegistry JSON

Overview

  • Toggle: a button named by toggleLabel (default "Show password"; pass a translation as needed) whose aria-pressed reports 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 takes autoComplete="current-password" or "new-password".

Hides Edge's built-in reveal button.

Installation

  1. 1

    Register the @fma-ds namespace in components.json (once)

    components.json
    {  "registries": {    "@fma-ds": "https://ds.fmartinsandre.dev.br/r/{name}.json"  }}
  2. 2

    Add the item

    pnpm dlx shadcn@latest add @fma-ds/password-input

    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