Components / component

Scroll Progress Bar

v1.0.0 · premium

A thin bar fixed to the top of the screen that fills as you read down the page.

Scroll Progress Bar demo

Implementation

A thin bar fixed to the top of the screen that fills as you read down the page.

Framework
React 19.3.1 with TypeScript
Motion
Native CSS and browser APIs. No GSAP required.
Available modes
build
Version
1.0.0 · published

Source code

Download source ZIP
export function ScrollProgressBar({ thickness = 4, ink, className }: {
  /** Height of the bar in pixels. */
  thickness?: number;

Quality evidence

Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .

Changelog

v1.0.0 · A thin bar fixed to the top of the screen that fills as you read down the page.

Frequently asked questions

What does the bar measure?

The whole document, from the top to the point where the last screen is visible. It also updates when the page grows or shrinks.

Is the progress bar announced to screen readers?

No. It is hidden from assistive technology because it only repeats what the scroll position already tells them.