Passcode
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initFieldPasscode(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/input-passcodeAbout this component
A one-time code field in neon: six glass cells outlined in pink tube light on a dark plate. A cyan cursor blinks in the cell you are on, each digit drops in and flickers alight, the cursor moves on by itself, and all six turn green when the code is complete.
Triggers
- Focus
- State change
- Neon
- Glow
- Keyframe
Techniques
- Keyframes
- CSS variables
- CSS transition
- Pseudo elements
- State machine
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
A single native text input named by aria-label ("One-time code, six digits"); the drawn cells are aria-hidden. Keyboard focus outlines the whole plate through :has(:focus-visible).
Reduced motion
Every transition and animation is switched off, and the cursor cell stays outlined in cyan.
Use it in anything you build, commercial and client work included. Licence