Progress bar

Progress bar

This tutorial shows how to build a reading progress bar that fills in as visitors scroll, using two divs and one scroll interaction.

Difficulty:
Beginner
Time:
~10 min

This reading progress bar WordPress build sits at the top of the page, giving readers a clear sense of how much of a post is left, and it’s built from nothing more than two divs and one scroll-based interaction.

Build the progress bar container

Add the outer container

From the Add panel, add a Div above the first section and rename it, for example to Outer. This will hold the progress bar itself.

Pin it to the top of the page

Set the Outer div’s position to Sticky with Top at 0, and raise its Z-index so it sits above the rest of the content. Set Overflow to Hidden so nothing extends past its edges. A background color is optional if you want the track itself to be visible.

Add the progress bar div

Inside Outer, add another Div and rename it to Progress bar. Give it a background color and a small height, for example 8 pixels, this is the bar that will actually fill as the page scrolls.

Animate it with scroll

Add a While scrolling interaction

Select the post content, since that’s what determines how far the reader has scrolled, and add a While scrolling interaction from the Interaction tab.

Translate the progress bar as the page scrolls

On the progress bar, add a Translate X action. Set its initial value to -100% so the bar starts fully off-screen, and its end value to 0% so it slides in and fills the outer container as the page scrolls.

Smooth it out with Linear easing

Set the interaction’s easing to Linear so the bar moves at a constant pace instead of jumping or easing unevenly, then preview the page and adjust the color, height, or easing to match your site.

Result

The page now has a progress bar pinned to the top that fills in smoothly as the reader scrolls through the post, built from two divs and a single scroll-based interaction.

Last updated: July 13, 2026

Still have more questions? Let us help!

Your cookie preferences

We use cookies to improve your experience, analyze traffic, and personalize content. By clicking "Accept all" you agree to storing them on your device. Read our privacy policy.