Component packs › Vouch › Password Rules

Password Rules

Every password rule is a latch on its own row that clicks shut as you type; the padlock opens when all five are met.

Password Rules is a password from Vouch, a component pack with 6 validation components: Form validation where every rule is a latch that clicks shut. Price: $2 for the whole pack.

Built with: latch per rule, show and hide, live rule count.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Password Rules props

PropTypeDefaultDescription
rulesPasswordRule[]
submitLabelstring
onSubmit(password: string) => void
autoplaynumber | falseShowcase mode: types a password by itself every N ms while visible.

Methods on the ref

Use it in React

import PasswordRules from './PasswordRules';

<PasswordRules />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Vouch

Good for: Form validation.