Very rad demo by Adam Argyle, which gives you a Spotlight / Focus effect upon pressing the Option/Alt key. Also works on Mobile. (Focus the CodePen embed first)
It basically is a fixed grey overlay with a
mask-image on top that gets dynamically adjusted using CSS Custom Properties:
mask-image: radial-gradient( circle at var(--mouse-x) var(--mouse-y), transparent 0%, transparent var(--focal-size), black 0% );
--focal-size changes while pressing the Option/Alt key.
Sprinkle in some Houdini
@property and the circle nicely animates upon getting shown/hidden:
More info can be found in this Twitter thread.
💡 Looks like a great addition to include in HTML-based slidedecks (*ping Hakim*).