Skip to content
Knsept
Free playbook

Scroll progress bar

A reading progress bar driven entirely by CSS scroll timelines, with a small JS fallback.

CSSUI Widgets Updated Sep 26, 2026
Live demo Reduced motion is on, so effects are toned down
<div class="reader" id="frame">
  <div class="bar"></div>
  <article>
    <p class="hint">Scroll inside this box ↓</p>
    <p>Line one of a long article.</p>
    <p>Keep going…</p>
    <p>Halfway there.</p>
    <p>Almost.</p>
    <p>A little more.</p>
    <p>Nearly done.</p>
    <p>The end. ✓</p>
  </article>
</div>

For a whole page, use animation-timeline: scroll(root) on a fixed bar. This demo uses a named timeline (--reading) on a scroll container so it works inside a box.

The JS block only runs where CSS scroll timelines aren't supported, so modern browsers do all the work off the main thread.

Background: Scroll-driven animations with zero JavaScript.

More from the library

Scroll & motion live

Count-up stats

Numbers that count up when they scroll into view, with easing and formatting. A quicker count with reduced motion.

Scroll & motion live

Reveal on scroll

Content that fades and rises into place as it enters the viewport, with staggered timing and no layout shift.

Navigation live

Smooth accordion

A FAQ accordion built on native details/summary, with a smooth open and close animation and an optional one-open-at-a-time mode.