What problem does it solve?
Scroll-driven text reveals often break inline markup, rely on fixed line counts, or harm accessibility. This Skill implements a word-by-word scroll reveal that preserves semantic links and emphasis, responsive line wrapping, and reduced-motion readability.
Core Features & Use Cases
- Semantic text splitting: Walks text nodes with TreeWalker instead of flattening with textContent or innerHTML, keeping links, em, strong, and marks intact.
- Normalized scroll mapping: Maps one section progress value to per-word opacity, blur, and vertical offset via CSS custom properties, with GSAP ScrollTrigger or a dependency-free requestAnimationFrame loop.
- Accessibility and cleanup: Honors prefers-reduced-motion, keeps screen-reader output natural, and restores the original DOM on teardown.
- Use Case: Apply it to an editorial manifesto, product statement, or onboarding passage so readers pace comprehension through scrolling, as in the included standalone demo page.
Quick Start
Use $scroll-scrubbed-word-reveal to make this marked-up passage become readable word by word as the user scrolls.