Browse components
Strength Field
A password field with a segmented strength meter that fills and warms toward green as rules are met, a rolling verdict word, a rule checklist and a show/hide toggle.
Installation
npx shadcn@latest add @glint-ui/strength-fieldFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/strength-field.json
Usage
import { StrengthField } from "@/components/ui/strength-field";
<StrengthField value={password} onChange={setPassword} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | "Password" | Field label. |
| placeholder | string | "Create a password" | Placeholder text. |
| showRules | boolean | true | List the rules with a check per rule met. |
| rules | ReactNode | — | Array of { label, test(value) }. Each rule met adds a segment. |
| value | ReactNode | — | Controlled value, pair with onChange(value). |
| className | string | — | Extra classes for the root element. |