What problem does it solve?
Building a cursor-following spotlight that reveals an alternate image treatment requires careful coordination of CSS masks, pointer tracking, easing, and cleanup; this Skill provides a complete, tested implementation pattern so the effect works correctly across browsers, pointers, and motion preferences.
Core Features & Use Cases
- Radial Mask Reveal: Stacks two pixel-aligned images and reveals the overlay through a feathered radial-gradient CSS mask driven by custom properties.
- Eased Pointer Tracking: Uses a single requestAnimationFrame loop with position and radius easing that starts under the pointer, collapses on exit or window blur, and stops when idle.
- Accessibility and Fallbacks: Handles coarse pointers with a static base image or toggle control, respects prefers-reduced-motion, and keeps the native cursor visible.
- Use Case: Build an editorial hero where a plaster product photo reveals an opal-glass version under the visitor's cursor, with a "Reveal material" button for touch and keyboard users.
Quick Start
Use the reveal-hover-effect skill to build a cursor-following spotlight that reveals a second aligned image through a soft radial mask.