
Scroll-Scrubbed Word Reveal
FreeEnhance reading comprehension through scroll-triggered text reveal.
Free · Opens the source repo
What Scroll-Scrubbed Word Reveal does
The Scroll-Scrubbed Word Reveal skill allows developers to create an interactive reading experience where text is revealed word by word as the user scrolls. This approach maintains the integrity of inline markup, such as links and emphasis, ensuring that the semantic structure of the text is preserved. It is particularly useful for displaying headlines, quotes, manifestos, or onboarding messages where pacing comprehension is crucial. By utilizing this skill, you can create a more engaging reading environment that adapts to the user's scrolling behavior.
To implement this skill, you start by preparing your text in an accessible format within the DOM. The skill employs a TreeWalker to navigate through text nodes without altering the original structure, ensuring that whitespace and inline elements remain intact. As the user scrolls, the skill calculates the scroll progress and maps it to the visibility of each word, allowing for a smooth and responsive reading experience. This method not only enhances readability but also supports various display settings, such as responsive line wrapping and reduced-motion preferences.
The skill is designed with accessibility in mind, offering features like immediate word reveal under reduced motion settings and ensuring that screen readers can interpret the text naturally. Developers can customize visual aspects such as opacity and blur to create the desired effect without compromising the reading experience. The skill also includes a cleanup process to restore the original text structure when no longer needed, making it a robust addition to any web project focused on enhancing user engagement and comprehension.
Overall, the Scroll-Scrubbed Word Reveal skill is ideal for developers looking to enrich the user experience on their websites or applications by pacing the delivery of content in a way that aligns with natural reading habits. It is a powerful tool for any project that aims to improve how users interact with text-based content, making it particularly suitable for educational platforms, marketing materials, and editorial websites.
When to use it
Use this skill when you want to create an engaging reading experience that reveals text progressively as users scroll, especially for content that benefits from paced comprehension.
When not to use it
This skill may not be suitable for static content where scrolling is not a primary interaction method or for applications that require immediate access to all text without delay.
What you can build with it
Onboarding Messages
Use the skill to reveal onboarding instructions word by word, guiding users through a new interface.
Editorial Passages
Enhance articles or blog posts by revealing quotes or key points as users scroll, maintaining engagement.
Product Statements
Create impactful product statements that reveal information progressively, helping users absorb key details effectively.
How to install Scroll-Scrubbed Word Reveal
View source1. Install with the skills CLI
npx skills add mengto/skills/scroll-scrubbed-word-reveal --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by mengtoScroll-Scrubbed Word Reveal
Make reading progress visible without replacing real text, breaking inline markup, or depending on a fixed line count.
Prepare the text
- Keep one untouched accessible text source in the DOM.
- Walk text nodes with
TreeWalker; do not flatten the container withtextContentorinnerHTML. - Skip
script,style, form controls, and elements marked with[data-no-split]. - Replace only non-whitespace tokens with spans and preserve whitespace nodes exactly.
- Mark generated spans
aria-hidden="true"only when an equivalent unsplit accessible copy remains available.
Preferred structure:
<p class="reveal" data-reveal>
Motion should <em>explain</em> the next state, not decorate it.
</p>
Avoid line-based splitting. Browser line wraps must remain free to change with container width, language, zoom, and font loading.
Map scroll to words
Use section progress as the single source of truth:
const reveal = Math.min(1, Math.max(0, progress));
const local = Math.min(1, Math.max(0, reveal * wordCount - index));
word.style.setProperty("--word-progress", local);
Interpolate hidden opacity, blur, and vertical offset from --word-progress. Keep the visible state identical to normal typography.
Use GSAP ScrollTrigger with scrub when precise starts, ends, refresh, or a shared timeline is needed. Use a dependency-free scroll measurement plus requestAnimationFrame for a standalone section.
Set useful defaults
- Hidden opacity:
0.12–0.3 - Blur:
4–10px - Vertical offset:
0.08–0.22em - Reveal span:
120–220%of the viewport for a paragraph - Direct word overlap:
10–30% - Easing: none for the scroll mapping; ease only the visual interpolation when needed
Expose the values as CSS custom properties. Scale the scroll span from text length rather than assuming one duration fits every passage.
Preserve emphasis
- Let links,
strong,em, marks, and accent spans keep their semantics and styling. - Use inherited color by default; style accents on the original element, not on token indexes.
- Do not reveal essential links only on hover or after the reader has passed them.
- Re-split only when the source text changes. Responsive wrapping does not require rebuilding tokens.
- Store enough state to restore the original DOM during cleanup.
Keep it readable
- Use real document flow; pin only when the copy and evidence justify a short deliberate reading beat.
- Do not use a typewriter cursor, random delays, or autoplay unless explicitly requested.
- Under
prefers-reduced-motion: reduce, show every word immediately, remove blur and transforms, and remove any pinning. - Keep screen-reader output natural and avoid announcing each word.
- Verify contrast in both the hidden and final states; hidden words may be quiet but the final text must meet the normal reading contract.
Clean up
Kill ScrollTriggers, remove scroll and resize listeners, cancel animation frames, and restore the original marked-up subtree on route change or component unmount. Refresh measurements after fonts load if start or end positions depend on text geometry.
Verify
Test inline links and emphasis, punctuation, repeated spaces, long words, 200% zoom, 390/768/1440 widths, content changes, forward and reverse scrolling, reduced motion, keyboard focus, screen-reader reading order, and teardown. The final DOM must still communicate the complete sentence with JavaScript disabled.
Use demo/index.html as the working reference and demo/PROMPT.md to recreate or remix it. Keep REFERENCES.md as the links-only implementation source list.
Frequently asked questions about Scroll-Scrubbed Word Reveal
Similar skills
Playwright Component Testing
Test React and Vue components in isolation with Playwright.
Fluent UI Blazor
Integrate Fluent UI components in Blazor applications effortlessly.
Build MCP App
Create interactive UI widgets for MCP servers.
Web Design Reviewer
Identify and fix design issues in websites efficiently.
Markstream Install
Seamlessly integrate Markstream for Markdown rendering.
GSAP & Framer Scroll Animation
Create advanced scroll animations effortlessly.
