Toggle Sidebar B
AppearanceLight & dark mode D

Swarm Cursor

Flocking particle swarm that chases the pointer, jostles for space and drifts apart at rest.

Default

Every prop is wired to the controls underneath. Move the pointer across the stage to pull the swarm along, and click to scatter it.

Dark previewReplay previewOpen in new tab

Move your cursor

a living swarm follows, click to scatter it

Customize

Color
Accent Color
Count8
Size5
Merge0.77
Glow0.75
Opacity1
Spread100
Separation0.15
Speed2.5
Wander0.25
Trail0.75

API Reference

SwarmCursor

PropTypeDefaultDescription
colorstring'#ffffff'Base color of the swarm.
accentColorstring'#ffffff'Color where the swarm is densest.
countnumber10Number of particles in the swarm.
sizenumber10Radius of each particle, in pixels.
mergenumber0.77How readily nearby particles fuse into a single body. Lower is gooier.
glownumber0.75Strength of the soft halo around the swarm.
opacitynumber1Overall opacity of the effect.
spreadnumber100Radius of the cloud the swarm orbits the cursor at.
separationnumber0.15How strongly particles push each other apart.
speednumber2.5Travel speed and turn rate of the swarm, on a 1-10 dial.
wandernumber0.25How strongly the drifting flow field pulls particles off their chase.
trailnumber0.75Length of the motion trail each particle leaves behind.
scatterOnClickbooleantrueBurst the swarm outward on click, then let it regroup.
enabledbooleantrueEnable or disable the effect.
default slotVNode-Content the swarm moves over.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • Purely decorative canvas with pointer-events disabled. Set enabled to false for users who prefer reduced motion.