How to Design a Scroll Progress Bar for Long Articles and Landing Pages

by | Nov 20, 2026 | Uncategorized | 0 comments

A scroll progress bar is a thin visual indicator that shows how far a reader has moved through a page. It sounds like a tiny detail, but good scroll progress bar design can lift reading completion on long-form articles and reduce abandonment on tall landing pages. Bad implementations do the opposite: they flicker, fight with sticky headers, fail contrast checks and annoy people who are sensitive to motion.

This guide covers the practical decisions: where to place the indicator, how thick it should be, how to pick colors that pass contrast rules, when it helps versus when it distracts, and how to build it with modern CSS or a few lines of JavaScript. Every snippet below is production ready and includes accessibility notes.

What is a scroll progress bar?

A scroll progress bar (also called a reading progress indicator) is a UI element that maps the current scroll position of a page or of a content block to a filled bar, rail or ring. At the top of the page it is empty, at the bottom it is complete.

Two important distinctions before you design one:

  • Page progress tracks the whole document, including header, footer, comments and related posts. It is easy to build but it lies a little: the bar hits 70% while the article text has already ended.
  • Content progress tracks only the article container. It is slightly more work and far more honest, so it is the version we recommend for blogs, documentation and case studies.

It is also not the same thing as a custom scrollbar. The native scrollbar is an interactive control. A progress bar is normally decorative and non interactive, which changes how you should expose it to assistive technology.

progress bar web design

When a scroll progress bar helps and when it distracts

The honest answer is that it depends on page length and intent. Use this table as a quick decision aid.

Page type Use a progress bar? Why
Long article, guide, whitepaper (1,500 words or more) Yes Reduces uncertainty about length and gives a sense of momentum
Tall storytelling landing page Yes, section based A side rail with section labels doubles as navigation
Documentation with a sticky table of contents Optional The active TOC item already communicates position
Short page, under two viewport heights No The bar fills instantly and reads as visual noise
Checkout, forms, dashboards, apps No Users confuse it with a step indicator or a loading state
Infinite scroll feeds No Progress is undefined, so the bar becomes meaningless

Rule of thumb: if the page is shorter than roughly 3,000 pixels, skip it. Below that threshold the indicator costs attention without buying clarity.

Placement options

1. Top bar (the default)

A full width bar pinned to the top edge, usually directly under a sticky header. It is the most recognizable pattern, it costs almost no layout space and it works identically on mobile and desktop.

  • Pin it to the bottom edge of the sticky header rather than to the viewport top, otherwise it disappears behind the header.
  • Give the container a background track only if the bar color is subtle. A naked bar on a white page often looks broken at 2% progress.
  • Keep z-index below modals and cookie banners.

2. Side rail (vertical)

A thin vertical track on the left or right margin, sometimes paired with section dots or chapter labels. It suits editorial layouts with wide margins and long landing pages with distinct sections.

  • Needs at least 80 pixels of free gutter, so plan a fallback to the top bar below 1024 pixels.
  • If you add clickable section markers, they become real controls: give them labels, focus styles and a 24 by 24 pixel minimum target.

3. Circular indicator

A small ring, usually in a bottom corner, often wrapped around a back to top button. It is compact, it feels premium and it pairs progress with a useful action.

  • Keep the ring between 40 and 56 pixels in diameter with a 3 to 4 pixel stroke.
  • Watch out for collisions with chat widgets, cookie notices and mobile browser toolbars.
  • Add a visible percentage or an arrow icon inside so the purpose is obvious.

4. Section or chapter progress

Instead of one global bar, show progress per section. Useful for pillar pages and multi chapter guides where readers jump around. It is the most informative pattern and the most expensive to build, since it needs an IntersectionObserver per section.

Placement Best for Pros Watch out for
Top bar Blogs, news, docs Familiar, responsive, cheap Sticky header conflicts
Side rail Editorial, long landing pages Can carry section labels Breaks on narrow screens
Circular Portfolios, product stories Compact, pairs with back to top Widget collisions
Per section Pillar pages, courses Most informative Heaviest to build and test

Thickness, shape and motion

Thickness is where most scroll progress bar design goes wrong. Too thin and it is invisible on a busy hero image. Too thick and it reads as a loading bar or a broken banner.

Thickness Feel Recommended use
2px to 3px Discreet, editorial News sites and text heavy blogs with strong brand color
4px to 6px Balanced, the safe default Most corporate blogs and documentation
8px and above Loud, marketing Campaign landing pages only, and only with a gradient or texture

Other craft details that matter:

  • Rounded caps look polished on side rails and rings, but on a full width top bar they create an odd notch at 100%. Square caps are safer there.
  • Animate with transform, not width. Animating width triggers layout on every frame. transform: scaleX() stays on the compositor.
  • Keep smoothing short. A transition of 80ms to 150ms removes jitter. Anything longer makes the bar lag behind the thumb and feels broken.
  • Never animate the bar on page load. It should appear already filled to the correct position if the user lands mid page via an anchor link.
progress bar web design

Color and contrast rules

A progress indicator is a non text graphic that conveys information, so it falls under WCAG 1.4.11 Non text Contrast. Treat 3:1 as your minimum.

  1. The filled bar needs at least 3:1 contrast against the track behind it.
  2. If there is no visible track, the filled bar needs 3:1 against the page background or hero image underneath.
  3. Over photography, add a 1px darker border or a soft shadow on the container so the bar never floats on an unpredictable background.
  4. Define separate tokens for light and dark themes. A navy bar on a near black header is invisible.
  5. Do not rely on hue alone. The length of the fill is the real signal, so make sure it is readable even in grayscale.

Gradients are fine, but test the left end of the gradient: at 3% progress the user only ever sees the first color, so that color alone must pass contrast.

Build it with CSS only (scroll driven animations)

Modern browsers support scroll driven animations, which means a progress bar with zero JavaScript and no scroll listeners. This is the best performing option in 2026, with a simple fallback for older engines.

<!-- Markup -->
<div class="progress" aria-hidden="true">
  <div class="progress__bar"></div>
</div>
/* Styles */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #e5e7eb;
  z-index: 60;
}

.progress__bar {
  height: 100%;
  background: #1d4ed8;
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: grow-progress linear both;
  animation-timeline: scroll(root block);
}

@keyframes grow-progress {
  to { transform: scaleX(1); }
}

/* Fallback: hide the empty track where the feature is missing */
@supports not (animation-timeline: scroll()) {
  .progress { display: none; }
}

/* High contrast and forced colors modes */
@media (forced-colors: active) {
  .progress { background: Canvas; border-bottom: 1px solid CanvasText; }
  .progress__bar { background: Highlight; }
}

To track only the article instead of the whole document, give the article a named scroll timeline with view-timeline or switch to the JavaScript version below.

Build it with JavaScript (universal support, content based)

This version measures the article container, so the bar reaches 100% exactly when the last paragraph ends, not when the footer ends. It uses requestAnimationFrame throttling and a passive listener.

<div class="progress" aria-hidden="true">
  <div class="progress__bar" id="readingBar"></div>
</div>

<script>
(function () {
  var bar = document.getElementById('readingBar');
  var article = document.querySelector('.entry-content');
  if (!bar || !article) return;

  var ticking = false;

  function update() {
    var rect = article.getBoundingClientRect();
    var distance = rect.height - window.innerHeight;
    var scrolled = Math.min(Math.max(-rect.top, 0), Math.max(distance, 1));
    var ratio = distance > 0 ? scrolled / distance : 1;
    bar.style.transform = 'scaleX(' + ratio.toFixed(4) + ')';
    ticking = false;
  }

  function onScroll() {
    if (!ticking) {
      ticking = true;
      window.requestAnimationFrame(update);
    }
  }

  window.addEventListener('scroll', onScroll, { passive: true });
  window.addEventListener('resize', onScroll);
  update();
})();
</script>

Add a short transition for smoothness, and disable it for users who ask for reduced motion:

.progress__bar { transition: transform 120ms linear; }

@media (prefers-reduced-motion: reduce) {
  .progress__bar { transition: none; }
}
progress bar web design

Circular scroll progress with SVG

The pathLength="1" trick normalizes the circle so you can drive it with a value between 0 and 1, no circumference math required.

<button class="ring" type="button" aria-label="Back to top">
  <svg viewBox="0 0 48 48" aria-hidden="true" focusable="false">
    <circle class="ring__track" cx="24" cy="24" r="20" pathLength="1"></circle>
    <circle class="ring__bar" cx="24" cy="24" r="20" pathLength="1"></circle>
  </svg>
</button>
.ring svg { width: 48px; height: 48px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring__track { stroke: #e5e7eb; }
.ring__bar {
  stroke: #1d4ed8;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ring-progress linear both;
  animation-timeline: scroll(root block);
}
@keyframes ring-progress { to { stroke-dashoffset: 0; } }

Because the ring is wrapped in a real button, keep the accessible name on the button and mark the SVG as decorative.

Accessibility notes

Reduced motion

A scroll linked bar is not time based animation, so it is generally tolerated by people with vestibular sensitivity. Still, follow these rules:

  • Remove easing and transitions under prefers-reduced-motion: reduce so the fill tracks the scroll exactly instead of sliding.
  • Never attach parallax, glow, pulsing or shimmer effects to the bar. Those are the parts that actually cause discomfort.
  • If your bar is part of a heavier scroll animation system, offer a full opt out and store the preference.

Screen readers

In most cases the bar is purely decorative, because a screen reader user already knows their position in the document. Use aria-hidden="true" on the container. Do not add role="progressbar" with a constantly changing aria-valuenow: in a live region it produces nonstop announcements, and without one it adds nothing.

If you genuinely need an exposed value, for example a course completion indicator, expose a static summary instead, such as a visually hidden text node updated only at 25%, 50%, 75% and 100% milestones with aria-live="polite".

Other checks

  • Support Windows High Contrast Mode with a forced-colors block, as shown above.
  • Make sure the fixed container never covers focus outlines of links in the sticky header.
  • Respect safe area insets on mobile so the bar does not sit under a notch or a browser toolbar.
  • Verify that zooming to 400% does not break the layout or hide the indicator.

Performance checklist

  1. Prefer the CSS scroll timeline version; it runs off the main thread.
  2. If you use JavaScript, always pass { passive: true } to the scroll listener.
  3. Throttle with requestAnimationFrame, never with setInterval.
  4. Cache element measurements and refresh them on resize or via a ResizeObserver, not on every frame.
  5. Use transform and opacity only. Avoid animating width, top or box-shadow.
  6. Keep the total cost under 1KB of CSS and JavaScript. A reading indicator should never delay Largest Contentful Paint.
progress bar web design

QA checklist before you ship

  1. Load the page via an anchor link: does the bar show the correct position immediately?
  2. Resize from 1440px down to 320px: does the bar switch to the top placement when the gutter disappears?
  3. Scroll to the very bottom: does it reach exactly 100% with no gap or overflow?
  4. Check the color in both themes and over hero images.
  5. Turn on reduced motion in the operating system and confirm transitions are gone.
  6. Run a contrast check on the filled bar against the track and the page.
  7. Open the page with a screen reader and confirm the bar is silent.
  8. Compare bounce rate and scroll depth before and after launch on a sample of long articles.

Common mistakes to avoid

  • Tracking the whole document instead of the article, so the bar finishes at the comment section.
  • Stacking the bar on top of a sticky header so it is partially hidden.
  • Using the same color as the loading indicator of the site, which makes the page look perpetually busy.
  • Adding percentage counters that update dozens of times per second and attract attention away from the text.
  • Shipping a bar on pages that are two screens tall, where it offers no information at all.

FAQ

Does a scroll progress bar improve engagement?

On long content it usually improves scroll depth and time on page slightly, because it reduces the uncertainty of an unknown page length. On short pages the effect is neutral or negative. Measure it with scroll depth events rather than assuming.

Top bar or side rail: which is better?

The top bar is the safer default because it is familiar and responsive. Choose a side rail when your layout has wide margins and you want to combine progress with section navigation, and always fall back to the top bar on small screens.

How thick should a scroll progress bar be?

Four to six pixels works for almost every corporate blog. Go down to two or three pixels for a more editorial feel, and only exceed eight pixels on campaign landing pages where the bar is part of the visual identity.

Can I build it without JavaScript?

Yes. CSS scroll driven animations with animation-timeline: scroll() create a full progress bar with no scripting. Use an @supports fallback to hide the empty track in browsers that do not support it.

Is a scroll progress bar an accessibility problem?

Not if it is built correctly. Hide it from assistive technology when it is decorative, remove transitions under reduced motion, meet 3:1 non text contrast, and support forced colors mode. Problems appear when it is turned into an announcing live region or combined with heavy scroll effects.

Should the bar track the article or the page?

Track the article container. Readers interpret 100% as the end of the content, so a bar that still has 30% left when the article ends feels inaccurate and undermines trust in the indicator.

In short: good scroll progress bar design is quiet. Pick one placement, keep it thin, make it contrast enough to be seen and never enough to be noticed, measure the content rather than the document, and respect motion preferences. Done well, nobody comments on it, and that is exactly the point.

Search Keywords

Recent Posts

Subscribe Now!