Use `IntersectionObserver` to watch how much of each step section has entered the viewport, and once it crosses a threshold, mark that step "active" and update the accompanying visual (color, icon, number). It performs better and reads simpler than reading scroll position on every frame yourself.
Give each step `scroll-snap-align` and scrolling comes to rest at step boundaries — a "turning one page at a time" feel; leave it off for a smoother, continuous feel. Pick based on the story's rhythm.
The classic implementation (e.g. scrollama) uses a "sticky + steps" layout: a pinned visual area with text steps scrolling past beside it. On narrow screens the visual and text can overlap and hurt readability, which is why mobile often gets its own layout.
When to use
Use it for data journalism, product stories, annual reports — content meant to be read in order. Give people who want to skip ahead a table of contents or a skip button.