Tug

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/slider-tug

About 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

More sliders

See all
DewGet code
LoupeGet code
ReedGet code
VolumeGet code