Cursor & Pointer
Trail Comet
Hot-pink comet spring-follows the cursor, dragging a tapering additive trail that lengthens with speed and flings spark particles. Idle: Lissajous demo loop.
canvasmedium complexitymoderate motionpointer
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
Worth keeping?
Votes steer what gets built next — sign in to cast one, free to read
When to use it
Dark-background hero sections, creative portfolios, cursor-effect showcases where a premium tactile feel is needed.
When not to
Light backgrounds (hardcoded dark fill). Forms or text-heavy layouts where a custom cursor competes with reading.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change comet color to cyan: replace all 'rgba(255,92,168,...)' with 'rgba(0,234,255,...)' and update the hot-core stop from rgba(255,210,235,...) to rgba(200,255,255,...). Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.
Safe to edit
- comet color (rgba(255,92,168,...))
- trail max length (MAX=110)
- spring stiffness (k=0.22 real / 0.14 demo)
- trail taper width multiplier (5.2)
- speed-to-length scale factor (sp*4.2)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- DPR-aware canvas sizing + setTransform
- visibilitychange pause/resume
- reduced-motion still() fallback
- IIFE wrapper
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Background hardcoded to #0a0a0f — change both CSS and ctx.fillStyle to use on light pages
- Reduced-motion renders one static frame, no pointer interactivity
More Cursor & Pointer components
- Magnetic DotGlowing pink dot springs to the pointer; a laggy outer ring squashes along its travel, joined by a fading tendril. Self-demos via Lissajous path when idle.
- Gooey Trail22 pink blobs chain-follow the pointer via spring physics and merge into liquid goo through an SVG feColorMatrix filter; auto-demos a Lissajous path when…
- Spotlight MaskRadial spotlight follows the pointer, punching through a dark veil to reveal a pink dot grid and glowing word. Auto-demos via Lissajous path when idle.
- Elastic RingGlowing pink ring trails the pointer with damped-spring physics, stretching along velocity and squashing across it. Auto-demos on a Lissajous path when idle.
- Ripple FieldGrid of dots ripples outward in expanding pink rings as the pointer moves; dots displace radially along each wavefront. Lissajous auto-demo when idle.