22°
Keypad
0 of 4 digits
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initCardKeypad(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/card-keypadAbout this component
A door lock whose whole silhouette is a padlock: a wide body moulded in soft sage resin, deep teal on dark, with a short, wide steel shackle arching over its top, four dots and ten keys that sink into the surface when pressed. Type any four digits and it opens: the shackle lifts and one leg swings free, the body glows mint and the dots melt into a tick; after a moment it closes again and the pad clears.
Triggers
- Card
- Neumorphic
- Click
- State change
- Spring
Techniques
- CSS transition
- Keyframes
- stroke-dashoffset
- CSS variables
- State machine
- SVG
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
Every key is a native button named by its digit or Delete inside a group labelled Code keys, with a visible focus ring; the live region announces how many digits are typed and Unlocked. The shackle, sockets, dots and tick are decorative.
Reduced motion
The shackle, body, dot, key and tick transitions are removed so the states switch as cuts.
Use it in anything you build, commercial and client work included. Licence