Password StrengthFreev1.0.0
Four cells and the reason in words, for any password input you already have: it rates the value you pass, says what would make it stronger, and announces changes politely.
Base UI
pnpm dlx shadcn@latest add https://beautiful-ui.dev/r/lumen-password-strength.jsonRadix
pnpm dlx shadcn@latest add https://beautiful-ui.dev/r/radix-nova/lumen-password-strength.jsonFree, no account or key. Use the command for your project's primitives: a radix-*, new-york or default style in components.json is Radix, a base-* style is Base UI. With the @beautiful-ui registry added, @beautiful-ui/<name> picks for you.
Usage
Import it and pass your content. The props that matter most are listed next.
Example
import { PasswordStrength } from "@/components/ui/lumen/controls/password-strength";
<Input id="pw" type="password" value={pw} onChange={(e) => setPw(e.target.value)} aria-describedby="pw-strength" />
<PasswordStrength id="pw-strength" value={pw} />Props
value–stringThe password to rate.
emptyHint"Use 8 or more characters, …"stringShown before anything is typed.
id–stringPoint the input's aria-describedby at it so the verdict is read with the field.
Source
components/ui/lumen/controls/password-strength.tsx