Add

Lorem ipsum

Lorem ipsum

A
A
A
Design

5 views

4 min

How to Add a Reading Progress Bar in Webflow

Learn how to add a reading progress bar in Webflow for your blog posts with a JavaScript script.

In this tutorial, Sandro, cofounder of Gemeos Webflow agency, shows you how to add a reading progress bar in Webflow for your blog posts.

Example

Scroll through the article to see the bar progress

How to Create a Reading Progress Bar in Webflow

The reading progress bar is a visual indicator that shows the user how far they are in an article. It fills up as they scroll.

To implement it in Webflow, you need a fixed Div at the top of the page and a JavaScript script that listens for the scroll event to update its width as a percentage.

The math is simple: divide the current scroll position by the document's total scrollable height, then multiply by 100 to get a percentage.

This component is especially useful for long blog posts or documentation pages. It reduces bounce rate by giving readers a sense of how much time is left.

Pair it with an anchor system so users can jump straight to the sections they care about.

Drag to simulate scrolling

CSS PropertyValueDescription
positionfixedFixed at the top of the page
top0Stuck to the top edge
left0Starts on the left
height3pxBar thickness
z-index9999Above everything else

1. Add a Div element to your page

Create a Div on your page and give it the reading-progress class. Set it to: position Fixed, top 0, left 0, height 3px, width 0%, z-index 9999. Choose your accent color as the background.

2. Add this script in the <body>

const bar = document.querySelector('.reading-progress');
window.addEventListener('scroll', function {
const scrollTop = window.scrollY;
const docHeight = document.documentElement.scrollHeight - window.innerHeight;
const progress = (scrollTop / docHeight) * 100;
bar.style.width = progress + '%';
});

3. Publish and test

The bar fills up gradually as you read. On a page with very little content, it will move fast: save this component for long articles.

good to know

To limit the progress bar to the article area only — not the whole page — replace document.documentElement.scrollHeight with the height of your article element: const article = document.querySelector('.article-content'); const docHeight = article.offsetHeight - window.innerHeight;

Conclusion

The reading progress bar boosts engagement on long-form content. Use cases:

  • Long-form blog posts
  • Documentation pages
  • Step-by-step tutorials

Good to know

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Lorem ipsum dolor sit amet consectetur.

Lorem ipsum dolor sit amet consectetur. Aliquam orci sagittis dignissim sapien praesent donec.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Published on

You might be interested in these tutorials

Similar tutorials

SEO / GEO

5 min read

5 views

How to Set Up a Redirect in Webflow? (2026)

Updated on 19.12.2025 by Sandro DA SILVA

SEO / GEO

5 min read

5 views

Add structured data to your Webflow site?

Updated on 21.08.2025 by Sandro DA SILVA

No-code

5 min read

5 views

How to Obfuscate a Link in Webflow

Updated on 23.04.2025 by Sandro DA SILVA

Let’s f*****G GO !!

Ready to launch
Your business?

Alexandre

Max

Enora

Bryan

Cannelle

Tiphaine

You'll :heart: our collaboration...