Particles
Drifting dust that reacts to the cursor.
Every edge, one mesh
Move your cursor through the field. The nodes make room.
2,481 nodes online
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/particles.jsonUsage
import { Particles } from "@/components/ui/particles"
<section className="relative overflow-hidden bg-[#05060a]">
<Particles connect />
<h1 className="relative">Every edge, one mesh</h1>
</section>Examples
Dust
Dense, slow and unlinked, it reads as dust in the air. Here the cursor gathers it instead of pushing it away.
Interaction and links
repel pushes, attract pulls particles into a loose orbit, and none ignores the cursor.
Colors
API reference
A canvas that fills its nearest positioned parent. Accepts native div attributes.
| Prop | Type | Default |
|---|---|---|
color | NeonColorParticle and link color. Cores are whitened so each particle reads as lit. | inherited |
density | numberParticles per 10,000 square pixels, capped at 420. | 1.4 |
speed | numberDrift speed. 0 holds them still, but the cursor still moves them. | 1 |
interaction | "repel"How the cursor moves nearby particles. | "repel" |
radius | numberReach of the cursor, in pixels. | 140 |
connect | booleanLink close particles with lines. A number sets the link distance in pixels (true is 110). | false |
Accessibility
- Decorative: rendered with aria-hidden and pointer-events: none. The cursor is tracked on the window, so content on top stays clickable.
- Links are batched by strength into six paths per frame instead of one stroke per line.
- It pauses offscreen and in hidden tabs, ignores the cursor under prefers-reduced-motion, and draws a still frame there instead.
- On touch screens a drag acts as the cursor; lifting the finger lets the particles settle.