Vector text illustration with a swinging spotlight mask illuminating the letters with a glowing neon effect

Swinging Spotlight Text Reveal

This is a Swinging Spotlight Text Reveal. It uses a virtual pendulum mask to selectively illuminate static vector letters as it passes over them. Its function is to direct user focus and add a tactile, environmental lighting effect to primary typographic elements. (Requires: gsap-js)

Technologies:
HTML CSS JavaScript
Difficulty:Intermediate
Browser Support (as of Apr 2026):
Chrome Chrome 49+ Edge Edge 79+ Firefox Firefox 51+ Safari Safari 10+
Features:
SVG MaskingGlow FilterPendulum Motion
Code by: Chris Gannon Chris Gannon
License: MIT
Minimalist web page with the text 'TOKYO TOWER'. A circular area around the mouse cursor reveals a photograph of the tower and changes the text color to white.

Cursor-Tracking Spotlight Reveal Effect

This Cursor-Tracking Spotlight Reveal Effect creates a sophisticated “x-ray” or “flashlight” interaction. Initially, the user sees plain text. As the mouse moves, a circular mask follows the cursor, revealing a hidden image underneath and simultaneously inverting the text color to white within the circle. This technique adds depth and playfulness to portfolio links or gallery items without disrupting the layout.

Technologies:
HTML SCSS JavaScript
Difficulty:Intermediate
Browser Support (as of Jan 2026):
Chrome Chrome 88+ Edge Edge 88+ Safari Safari 14+ Firefox Firefox 86+
Features:
CSS Clip-PathMouse TrackingSpotlight EffectDual-Layer Typography
License: MIT
A navigation menu where a spotlight effect highlights the currently active menu item.

Animated Navigation

A spotlight navigation menu where the active state is highlighted by a moving “light beam” element.

See the Pen Animated Navigation.

Interactive Spotlight Effect

Interactive Spotlight Effect

An interactive “spotlight” effect created with clip-path: circle(), whose position is controlled via CSS variables. JavaScript tracks the cursor and updates the variables inside a requestAnimationFrame loop for a smooth and performant animation.