01.11 · Scroll-Based
Scrollytelling
A picture beside the story changes as you read down. Best for data stories.
Scroll it
Scroll inside the box, or press Play and it scrolls for you.
Inside, each chapter's bar fills as the reading line passes through it, and the picture blends toward the next chapter's depth and color by that share. Scroll the box or press Play to watch.
Jumps each chapter changes the picture only when a new chapter crosses the reading line; Blends smoothly moves it a little with every bit you scroll. Scroll the box or press Play to watch.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a scrollytelling layout to [your story and the picture that goes with it]. Put the story in a column of chapters that scrolls, and keep the picture in view beside it. Work out which chapter has passed a reading line about 40% down the view and how far it is toward the next, as a fraction, and blend every value in the picture between the two chapters with it, such as colors and a counting number, so the picture changes smoothly as the visitor reads. On phones, pin a short strip of the picture above the text. If the visitor has reduced motion turned on, change the picture without fading.
Your settings
Replace the words in brackets with your own story and picture.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.