01.22 · Scroll-Based

Text Fill on Scroll

Words light up one by one as you scroll. Best for key statements.

Scroll it

Scroll inside the box, or press Play and it scrolls for you.

Try it

Change a setting, then scroll again or press Play.

The next word to fill shows in color, like a cursor.

Fill finishes

Early leaves the whole text lit for a while.

More optionsFewer options

Highlight color

The color of the word being filled.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add a scroll-driven text fill to [the statement or paragraph you want read]. Pin the paragraph in place while the visitor scrolls through a section a few screens tall. Split it into words, show every word in a dim but readable gray, and light the words up one by one in step with the scroll, so how far the reader has scrolled decides how much is lit and scrolling back up un-lights them. When the settings include it, show the next word to fill in a highlight color, like a reading cursor. Keep it real text for screen readers. If the visitor has reduced motion turned on, change each word's color without fading. Match the settings listed below.

Replace the words in brackets with your own element. Your settings are added at the end.

Free and open source. If this helped, a star on GitHub helps other people find it.

Star on GitHub

What it is

The full explanation is in README.md.

Good for

  • Key statements
  • Manifestos
  • Landing page intros

Avoid on

  • Body text
  • Long articles