Skip to content

    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.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/strength-field

    First 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

    PropTypeDefaultDescription
    labelstring"Password"Field label.
    placeholderstring"Create a password"Placeholder text.
    showRulesbooleantrueList the rules with a check per rule met.
    rulesReactNode—Array of { label, test(value) }. Each rule met adds a segment.
    valueReactNode—Controlled value, pair with onChange(value).
    classNamestring—Extra classes for the root element.