Velocity X Components

Long-form

Reading Progress Bar

A thin fixed bar across the top of the page that fills as the reader moves through an article, giving a constant sense of how much is left. Driven entirely by IntersectionObserver thresholds rather than a scroll handler, so there's no layout thrashing on long pages.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add reading-progress

Built for astro.

Full docs for Reading Progress Bar →

Needs a licence key — subscribe here, then velocityx loginonce.

astro v1.0.1
Reading Progress Bar

Props

NameTypeRequiredDefaultDescription
targetstringYes`id` of the element the progress should track (your article container).
labelstringNo'Reading progress'Visually hidden label for the bar, for screen reader users.

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/reading-progress/ReadingProgress.astro

Using the Reading Progress Bar component

Install it with velocityx add reading-progress. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from Long-form.