Charge
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/button-chargeAbout this component
A fighting-game style button: hover to charge a light gray power bar from left to right over 1.5 seconds via requestAnimationFrame. When the bar reaches 100%, the button fires, turning bright white with a pulsing box-shadow glow and "FIRED!" text for 800ms. Mousing away before full charge resets the bar. No dependencies.
Triggers
- Hover
- State change
Techniques
- CSS variables
- Transform only
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
The bar fill is driven by JS width, not animation.
Reduced motion
Skip the rAF loop and use a CSS transition-based approach without the glow box-shadow.
Use it in anything you build, commercial and client work included. Licence