Convoy

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/toggle-convoy

About this component

A location switch whose thumb tows three beads: when it moves they string out behind it in a line, each a beat behind the last, and bunch up behind it again when it stops.

Dependencies
None
Difficulty
Intermediate
Reduced motion
Respected
Theme
Light and dark
Follows page color-scheme

Triggers4

  • Click
  • State change
  • Delay stagger
  • Spring

Techniques3

  • CSS transition
  • Transition delay stagger
  • Transform only

Accessibility

Keyboard and screen readers

A native checkbox with role="switch" inside a <label>, so Space toggles it and the visible text names it; :focus-visible on the input outlines the track, which is aria-hidden.

Reduced motion

The beads move together.

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

More toggles

See all
DampGet code
DepthGet code
DIPGet code
DoodleGet code