by jeff
SVG mask transitions on scroll: Watanabe's Codrops tutorial shows four GSAP ScrollTrigger patterns, turning a simple page scroll into a cinematic reveal.
Published on March 11, 2026, SVG Mask Transitions on Scroll with GSAP and ScrollTrigger by Hiroki Watanabe is a deep-dive tutorial combining SVG masking precision with GSAP's ScrollTrigger. The result is a set of scroll-driven reveals that feel intentional and atmospheric, exactly the kind of interaction that separates good web experiences from memorable ones.

Four SVG Mask Transitions, Four Personalities
What makes this tutorial stand out is the range. Watanabe delivers four distinct animation systems, each revealing an image on scroll with a different visual logic. Horizontal Blinds uses thirty strips that expand outward from center, a 0.02-second stagger between pairs creates an organic, wave-like rhythm. Random Grid divides the screen into an adaptive grid where each panel reveals in a randomized sequence, chaotic on the surface but structured underneath. Vertical Blinds runs twelve strips that wipe open left to right like curtains, producing a flowing cinematic progression. Column Random Grid is the most sophisticated: columns reveal left to right while the order within each column stays random, a structured wave that feels genuinely alive.

The Technical Foundation Behind These SVG Mask Transitions
The elegance comes from a smart coordinate system. Using viewBox="0 0 100 100" virtual units instead of pixels keeps mask calculations consistent across screen sizes. Dynamic vbWidth computation rebuilds timelines on resize. GSAP's ScrollTrigger synchronizes everything with scrub: 2.0–2.5, adding trailing motion that makes the SVG mask transitions feel physical. Lenis smooth scrolling adds inertia, while shape-rendering="crispEdges" eliminates subpixel artifacts in complex SVG grids.

For designers who code, this tutorial is an immediate resource. The live demo and full source on Codrops offer clean, well-structured code ready to adapt for portfolios, brand sites, or digital magazines, a sophisticated alternative to the fade-and-slide transitions that have dominated web design for years.
