Password field
Capture sensitive text with a visible reveal control.
npx shadcn@latest add @silicon-ui/password-fieldInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/password-fieldManually
Install the dependencies
npm install motionCopy these files into your project
- components/silicon-ui/password-field/password-field.tsx
- components/silicon-ui/password-field/password-field.module.css
Add the foundation, once per app, for the design and motion tokens
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
API reference
| Prop | Type | Default |
|---|---|---|
label* | string | — |
description | string | — |
messagesTranslated or reworded toggle names. | Partial<PasswordFieldMessages> | — |
Also accepts the props of InputHTMLAttributes<HTMLInputElement>, except type.
Dependencies
- npm
- motion
- Registry
- silicon-motion-tokens