Back

Scroll Progress

Satu Visual ComponentNew

A top bar that fills as the page is scrolled.

Scroll progress bar (fixed to top on your page)

Installation

Add it with the CLI:

Terminal

$

Or open the Code tab above and copy it in manually — it relies on the standard cn() helper from @/lib/utils.

Usage

Mount once near the root. Fixed to the top; pass a targetRef to track a specific element instead of the page.

Props

PropTypeDefaultDescription
colorstring#8b5cf6Bar color.
targetRefRefObjectElement to measure (defaults to page).
classNamestringExtra classes.