Tug
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initSliderTug(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/slider-tugAbout this component
Two beams pushing: a fire beam from the left and a volt beam from the right meet at a white-hot clash point you drag; sparks fly as it moves, the side with the ground swells, and at either end the losing beam shatters.
Triggers
- State change
- Glow
- Continuous
Techniques
- CSS variables
- Keyframes
- requestAnimationFrame
- SVG
Difficulty
Advanced
Accessibility
Keyboard and screen readers
A native range input named "Balance", laid invisibly over the drawing, so keyboard, touch and screen readers work as usual; focus outlines the track.
Reduced motion
The flow and bursts stop.
Use it in anything you build, commercial and client work included. Licence