masked-reveal

Creates staggered word-by-word scroll reveal animations using GSAP ScrollTrigger and overflow masks.

3|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/langgenius/due-date-hq-jwl --skill masked-reveal-langgenius
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: masked-reveal
Source: https://github.com/langgenius/due-date-hq-jwl/tree/main/.claude/skills/masked-reveal
Command: npx skills add https://github.com/langgenius/due-date-hq-jwl --skill masked-reveal-langgenius

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap.

What problem does it solve? Headlines and hero copy often appear statically on scroll, missing the polished editorial feel of word-by-word masked reveals. Implementing this effect by hand requires careful text splitting, accessibility handling, and reduced-motion support that is easy to get wrong. ## Core Features & Use Cases - Masked Word Splitting: Splits text into word spans wrapped in overflow-hidden masks without the paid GSAP SplitText plugin, preserving spaces and the original text via aria-label. - ScrollTrigger Animation: Animates words from yPercent 110 to 0 with configurable duration, stagger, and easing when the element reaches 82% of the viewport. - Accessibility and Safety: Hides text only when JavaScript runs, respects prefers-reduced-motion, and provides a React cleanup pattern using gsap.context. - Use Case: Apply it to a landing page hero heading so each word rises through an invisible mask in a staggered sequence as the user scrolls it into view. ## Quick Start Add a masked staggered word reveal to my hero heading using GSAP ScrollTrigger with the data-masked-reveal attribute.

Frequently Asked Questions about masked-reveal

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a word-by-word text reveal on scroll with GSAP?

Split the element's text into word spans wrapped in overflow-hidden mask containers, then animate each word from yPercent 110 to 0 with a stagger using GSAP ScrollTrigger. Trigger the animation when the element top reaches about 82% of the viewport.

How to split text into words without GSAP SplitText plugin?

Split the textContent on whitespace with a regex that keeps separators, then wrap each word in a span with class word inside a word-mask span. Escape HTML entities and store the original text in an aria-label for screen readers.

Does GSAP ScrollTrigger text animation work with React?

Yes. Run the initialization inside useLayoutEffect wrapped in gsap.context scoped to a root ref, and return ctx.revert() for cleanup. This ensures ScrollTrigger instances are destroyed on unmount or route changes.

How do I handle prefers-reduced-motion in scroll text animations?

Check window.matchMedia for prefers-reduced-motion before initializing and skip the animation entirely. Also add a CSS media query that keeps text visible and removes transforms so reduced-motion users see static text.

Why does my masked text reveal break with links or inline elements?

The splitting approach replaces innerHTML with plain word spans, which destroys nested markup like links, buttons, or inline elements. Only apply masked reveals to plain text headings without meaningful inline markup.