Code Slots
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initFieldCodeSlots(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-code-slotsAbout this component
A one-time code field drawn as six cells. Digits roll up into their cell and a caret blinks in the next one; when the sixth lands, the cells slide together into one pill and a tick pops beside it. One real input underneath, so paste and SMS autofill just work.
Triggers
- Focus
- State change
- Delay stagger
- Spring
Techniques
- Keyframes
- CSS transition
- Pseudo elements
- State machine
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
One real input (inputmode numeric, autocomplete one-time-code) inside a <label>, so it is named "Verification code" and paste and SMS autofill work. The drawn cells are aria-hidden; a polite live region says "Code complete".
Reduced motion
Nothing animates.
Use it in anything you build, commercial and client work included. Licence