Passcode

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-passcode

About 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

More inputs

See all
RisoGet code
SeekGet code
StickerGet code
StitchGet code