01.17 · Scroll-Based
Progress Bar
A bar fills as you read down the page. Best for long articles.
Scroll it
Scroll inside the box, or press Play and it scrolls for you.
How a reading progress bar works
A progress bar tells readers how far through an article they are. It fills as they scroll down, and it is full when the last line comes into view.
“It answers one question: how much is left?”
It compares how far the page has scrolled with how far it can scroll in total, so the bar reaches the end exactly when there is nothing left to read.
Where to put it
A bar across the top is the most noticeable choice. It sits in plain sight and tells readers this is a long piece. A thin rail down the side does the same job more quietly, which is why many magazines prefer it.
A ring in the corner takes the least room. It fills around its edge like a clock face and can show the percentage in the middle.
How thick to make it
A hairline bar is almost invisible until you look for it; a thick one is hard to miss. News sites tend to keep it thin, while documentation often makes it bolder, because readers there want to keep track of their place.
Keeping it smooth
Whatever it looks like, the indicator should move with the scroll and never make the page stutter, especially on phones.
Inside, the strip is the whole article and the frame is the box; the fill is the distance scrolled out of the distance it can scroll. Scroll the box or press Play to watch.
No indicator gives no sign of how much is left; With a bar fills as the same text scrolls, full when the last line shows. Scroll the box or press Play to watch.
Try it
Change a setting, then scroll again or press Play.
Indicator
The top bar is the loudest; the side rail the quietest.
Thickness
Thin is barely there; thick is hard to miss.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a reading progress indicator to [your article or long page]. Work out how far the reader has scrolled as a share of the total distance they can scroll, and show it as a bar that fills along the top, a ring that fills in a corner, or a thin rail down the side, so it is full exactly when the last line is in view. Keep the indicator outside the scrolling content so it stays in place, and grow it with a transform rather than by changing its width, so scrolling stays smooth. Hide the indicator from screen readers; it only repeats what scrolling shows. It follows the reader's own scrolling, so reduced motion needs no change. Match the settings listed below.
Your settings
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 GitHubWhat it is
The full explanation is in README.md.