Skip to content
All effects

Word-by-word scroll highlight

One big statement that lights up word by word as you scroll through it.

Scroll

This is the real effect. Scroll or move your mouse inside the frame to try it.

The prompt

Add a word-by-word scroll highlight to [the statement I point to]: the text lights up word by word as you scroll through it. Behaviour: the section gets extra height (about 200vh) with a sticky inner area of 100vh that holds the statement. Split the text into words with JavaScript and wrap each word in a span. Keep the full sentence readable for search engines and screen readers (put it in an aria-label on the container and hide the spans with aria-hidden). Every word starts at about 15% opacity. The reveal is scrubbed by the scroll: it starts as soon as the statement comes into view (section top at about 75% of the viewport) and finishes just before the section unpins. Map that scroll range to the number of lit words, so the words go to full opacity one by one in reading order, and run backwards when scrolling up. The word that is being lit gets a partial opacity, so it feels smooth instead of stepping. No library. Respect prefers-reduced-motion by showing the whole text at full opacity. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.

What it is

One big sentence that starts out faint. As you scroll, it lights up word by word, like someone reading it out loud to you.

When it works

For your mission, your big promise, the one sentence you really want people to read. On the program pages I use it for the mission statement. The scroll slows people down, so the words actually land.

Get it right

  • Use it once per page. Twice and it feels like a gimmick.
  • Keep the sentence short. 20 to 35 words.
  • Keep the full text in the HTML, so search engines and screen readers get it in one piece.

Also called

  • Scroll text reveal
  • Text highlight on scroll
  • Scroll-linked text fill
  • Reading progress text

More effects.

All effects