Colony

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/slider-colony

About this component

A foragers slider: a trail of ants runs between the nest at the start of the track and a sugar cube, the thumb. Ants march out along the top of the trail and come home along the bottom carrying crumbs; send more and the trail gets busier, and moving the cube stretches their march.

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

Triggers3

  • State change
  • Loop
  • Delay stagger

Techniques4

  • Keyframes
  • CSS variables
  • Transition delay stagger
  • Radial gradient

Accessibility

Keyboard and screen readers

A native range input named Foragers with the ant count as its value text; the trail is aria-hidden.

Reduced motion

The ants stand still.

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

More sliders

See all
ContourGet code
CrosshatchGet code
CrystalGet code
CymaticsGet code