Browse components
Swarm Cursor
A flock of boids that separates, aligns and swirls around the cursor, leaving luminous trails.
Swarm Cursor
Installation
npx shadcn@latest add @glint-ui/swarm-cursorFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glint-ui-seven.vercel.app/r/swarm-cursor.json
Usage
import { SwarmCursor } from "@/components/ui/swarm-cursor";
<div className="relative h-96">
<SwarmCursor count={160} />
</div>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| count | number | 160 | Number of boids. |
| color | string | "#c6ff3d" | Boid color. |
| accent | string | "#22d3ee" | Color of the fastest boids. |
| maxSpeed | number | 5 | Top speed in px per frame. |
| size | number | 7 | Boid length in px. |
| trails | boolean | true | Draw faint motion trails behind each boid. |
| className | string | — | Extra classes for the root element. |