Compact
Compact Password Input
A 32px password field with show, copy, a random password generator, and a strength meter with its rules.
src/components/ui/compact-password-input.tsxNo ui-sdk
With generator and meter
Memuat
Import
tsx
import {
CompactPasswordInput,
generatePassword,
passwordScore,
} from "@/components/ui/compact-password-input";Guidelines
- Use
autoComplete="new-password"when creating accounts, so password managers offer to save it. - The generator uses
crypto.getRandomValuesand leaves out look-alike characters (0/O, 1/l/I).