Spectrum
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initFieldSpectrum(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-spectrumAbout this component
A message field where each letter you type takes the next hue of a seven-colour cycle and pops in on a spring. The caret already carries the coming colour, the slab glows with it, and a little colour wheel clicks round one segment per key.
Triggers
- Focus
- Spring
- Glow
- State change
Techniques
- Conic gradient
- Keyframes
- CSS variables
- Text animation
Difficulty
Advanced
Accessibility
Keyboard and screen readers
A native text input named by aria-label ("Message"); the mirrored letters, wheel and caret are aria-hidden, and the input keeps its native selection. Focus draws a ring in the coming colour.
Reduced motion
Letters appear without the pop and the caret stays solid.
Use it in anything you build, commercial and client work included. Licence