Glitch Error
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initFieldGlitchError(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-glitch-errorAbout this component
On failed validation the input briefly glitches (a CSS invert/brightness flicker plus translateX jitter keyframe over 500ms), then snaps to a bright border. Unsettling, memorable error feedback.
Triggers
- Focus
- State change
- Border
Techniques
- Keyframes
- Filter
Difficulty
Advanced
Accessibility
Reduced motion
Glitch animation is skipped under prefers-reduced-motion; border turns bright immediately. aria-invalid is set on error.
Use it in anything you build, commercial and client work included. Licence