MengTo / Skills
staggered-word-reveal
Create subtle editorial word-by-word text reveal animations where each word fades and rises into place once it enters the viewport. Use for premium portfolio headlines, hero copy, section intros, and short marketing text that needs a cinematic staggered reveal with IntersectionObserver or in-view detection.
Install
npx skills add https://github.com/MengTo/Skills --skill staggered-word-revealStaggered Word Reveal
Use When
- A short headline, intro, or pull quote should reveal word by word.
- The motion should feel editorial, premium, and restrained.
- The reveal should trigger only once when the text enters the viewport.
- The project does not need heavy GSAP SplitText behavior.
Motion Defaults
- Initial state:
opacity: 0,transform: translateY(20px). - Final state:
opacity: 1,transform: translateY(0). - Duration:
0.8s. - Ease:
cubic-bezier(0.16, 1, 0.3, 1). - Stagger:
0.06sto0.08sper word. Default to0.07s. - Trigger: start around
20%visible, with a slight lower viewport bias. - Replay: once only.
HTML
CSS
Keep no-JS content visible. Hide only after JavaScript is active and before the text has been split.
JavaScript
This splitter preserves spaces, avoids innerHTML, exposes the original sentence to screen readers, and unobserves after the first reveal.
Framework Notes
- React/Vue/Svelte: run the splitter after mount, then clean up observer instances on route changes.
- Framer Motion: keep the same tokens:
y: 20,opacity: 0, duration0.8, ease[0.16, 1, 0.3, 1], stagger0.06to0.08,once: true. - GSAP: use
fromTo(words, { y: 20, opacity: 0 }, { y: 0, opacity: 1, duration: 0.8, ease: "expo.out", stagger: 0.07 }).
Taste Rules
- Use on short text: headlines, subheads, labels, and quotes. Avoid long paragraphs.
- Stagger words, not letters, for a calmer premium feel.
- Keep the offset subtle. Do not add bounce, rotation, or large blur.
- Animate
transformandopacityonly. - Do not split text containing links, buttons, or meaningful inline markup.
- If wrapping is important, initialize after web fonts are ready.
Quick Checks
- Text is visible when JavaScript is disabled.
- Words begin at
translateY(20px)andopacity: 0. - Each word reveals once with a
0.06sto0.08sdelay. - Repeated scrolling does not replay the animation.
- Reduced-motion users see static readable text.