Password Strength
A React password field with a four step strength meter and a live rule checklist. Announces the score politely and accepts your own scorer such as zxcvbn.
src/registry/ui/password-strength.tsx/r/password-strength.json
Installation#
bash
npx shadcn@latest add https://ui.minidev.pro/r/password-strength.json
Usage#
tsx
import { PasswordStrength } from "@/components/ui/password-strength"
export function Example() {
return <PasswordStrength />
}
API reference#
| Prop | Type | Default |
|---|---|---|
value | string | - |
defaultValue | string | "" |
onChange | (value: string) => void | - |
rules | Rule[] | DEFAULT_RULES |
score | (value: string) => number | - |
label | string | "Password" |
id | string | - |
className | string | - |
Dependencies#
npm
lucide-react
Built from
Related forms components#
AutocompleteText input that filters string options as you type, using ARIA combobox and listbox roles. Works controlled or uncontrolled and lists up to eight matches.Calendar MonthMonth calendar grid with weekday headers and clickable day cells that highlight the selected date. A simple Tailwind base for date views and schedulers.Character CountLive React character counter that shows the current count against a limit and turns red when it goes over. Announces changes politely to screen readers.Checkbox GroupVertical wrapper that groups related checkboxes under role group with even spacing. Use it with Checkbox and labels for multi select settings.CheckboxShadcn style checkbox on Base UI with an animated check, indeterminate state, invalid and disabled styles, and an enlarged hit area for touch.Chip FilterSingle select filter chips in React that behave as a radio group, with an accent ring on the active chip. Good for quick filters above lists and tables.
All form components