Component packs › Latch › Tumbler Password
The strength meter is a pin-tumbler lock: every rule you meet lifts a pin to the shear line with a click, and when all five are set the keyhole turns and the shackle springs open.
Tumbler Password is a password field from Latch, a component pack with 8 components: Form and sign-in components that work like little mechanisms. Price: $2 for the whole pack.
Built with: pin springs, live rule list, show/hide.
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.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | Field label. | |
title | string | Title next to the lock. | |
placeholder | string | ||
rules | TumblerRule[] | 8+ characters, upper case, lower case, number, symbol | Up to 6 rules, one pin each. Default: 8+ characters, upper case, lower case, number, symbol. |
theme | 'dark' | 'light' | 'dark' | Surface theme. Default 'dark'. |
onChange | (value: string, passed: number) => void | Called on every change with the value and how many rules pass. | |
autoplay | boolean | Showcase mode: types a demo password until touched. |
readonly value: stringreadonly passed: numbersetValue(v: string): voiddestroy(): voidimport TumblerPassword from './TumblerPassword';
<TumblerPassword />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Form and sign-in components.