Component packs › Latch › Tumbler Password

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.

Tumbler Password props

PropTypeDefaultDescription
labelstringField label.
titlestringTitle next to the lock.
placeholderstring
rulesTumblerRule[]8+ characters, upper case, lower case, number, symbolUp 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) => voidCalled on every change with the value and how many rules pass.
autoplaybooleanShowcase mode: types a demo password until touched.

Methods on the ref

Use it in React

import TumblerPassword from './TumblerPassword';

<TumblerPassword />

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

More in Latch

Good for: Form and sign-in components.