React
The playground’s React tab gives you a useEffect + initTrail snippet. Treat it as a tiny presentational component that mounts once and returns null.
Integration
- Design the trail in the playground, then copy the React tab into e.g.
CursorTrail.jsx. - Render it from your root layout (or
App) so every route shares the same effect. - Respect
prefers-reduced-motionif your audience needs it — skip mounting the component when that media query matches. - Keep the trail out of heavy parents that re-render often; the effect lives in
useEffectwith an empty dependency array.
Tuning
The same sliders you export (trail length, fade, chase, glow, etc.) are what you’d tweak if you later edit the generated config object. See Guides → Playground features for the full list.