Electric

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-electric

About this component

An SVG overlay traces an electric arc around the input border via stroke-dashoffset animation on focus. White neon sparking effect that completes a full perimeter trace.

Triggers

  • Focus
  • Border
  • Glow

Techniques

  • Keyframes
  • CSS variables

Difficulty

Advanced

Moves on

Its code uses this curve. Open one to see it plotted and tune it.

Accessibility

Keyboard and screen readers

Border color provides focus indicator.

Reduced motion

SVG trace animation is disabled under prefers-reduced-motion.

Use it in anything you build, commercial and client work included. Licence

More inputs

See all
Glitch ErrorGet code