Cursor & pointer

Particle trail

Iridescent sparks shed by the pointer with velocity, drag and drift — and a burst on click.

Paste it into ChatGPT, Claude, Cursor or v0.
density6
life1.1
gravity-40
shape

Usage

import { ParticleTrail } from '@vizzele/react';

<ParticleTrail density={6} shape="spark" />

Props

PropTypeDefaultDescription
densitynumber6Particles per 100px travelled.
maxnumber220Max particles alive (halved on low-end devices).
size[number, number][2, 6]Size range in px.
gravitynumber-40Vertical drift in px/s² (negative floats up).
lifenumber1.1Lifetime in seconds.
shape'spark' | 'square' | 'ring''spark'Particle shape.
colorsstring[]iridescent paletteColors to pick from.
burstOnClickbooleantrueReact only: burst on press.

Accessibility

  • One overlay canvas, `aria-hidden`, never blocks clicks; it sleeps when no particle is alive.
  • Off with reduced motion. On touch it only emits while your finger moves.