forever components

Cursor & Pointer

Spotlight Mask

Radial 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.

canvasmedium complexitymoderate motionpointer

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
Worth keeping? Votes steer what gets built next — sign in to cast one, free to read

When to use it

Dark-theme hero sections, teaser/reveal interactions, portfolio landing pages that want cursor-driven drama.

When not to

Light backgrounds (veil color hardcoded dark navy). Contexts where cursor visibility matters — cursor is hidden inside the canvas.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change the revealed word by setting WORD='HELLO', shift accent to electric blue by setting ACC='#00eaff' and updating all rgba(255,92,168,...) calls to match. 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

  • revealed word (WORD variable)
  • accent color (ACC='#ff5ca8')
  • spotlight radius scale (base = min*0.22)
  • lerp spring speed (k=0.18 pointer / 0.085 demo)
  • dot grid density (gap = min/16)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • evenodd arc clip for outer veil
  • DPR-aware canvas sizing
  • visibilitychange pause
  • prefers-reduced-motion static fallback
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Light re-theme via the [data-theme=light] token block; catalog bg/accent describe the dark default
  • cursor:none hides the system cursor inside the tile — must restore in production wrappers
  • Dot grid loops over full canvas each frame; dense grids on large screens may drop frames

spotlightmaskrevealcanvaspointerveildark-ui

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…
  • 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.
  • Trail CometHot-pink comet spring-follows the cursor, dragging a tapering additive trail that lengthens with speed and flings spark particles. Idle: Lissajous demo loop.
  • 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.