Password field

Capture sensitive text with a visible reveal control.

npx shadcn@latest add @silicon-ui/password-field
fieldsecurity
Loading…

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/password-field

Manually

  1. Install the dependencies.

    npm install motion
  2. Copy these files into your project. Shared files are skipped if you already have them.

    • components/silicon-ui/password-field/password-field.tsx
    • components/silicon-ui/password-field/password-field.module.css
  3. Install the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

Source codetsx
import { PasswordField } from "@/components/silicon-ui/password-field/password-field";

API reference

PropTypeDefault
label*string—
descriptionstring—
messages

Translated or reworded toggle names.

Partial<PasswordFieldMessages>—

Also accepts the props of InputHTMLAttributes<HTMLInputElement>, except type.

Dependencies

npm
motion
Registry
silicon-motion-tokens