Scroll Progress
Motion
Free, copy-pasteable Tailwind CSS & Framer Motion Scroll Progress component. Accessible, fully responsive, dark-mode ready, and customizable.
On this page
Keep readers oriented inside long articles or configuration processes using the Scroll Progress Indicator. This component maps scroll depth dynamically, animating a top page progress bar or a circular percentage ring using Framer Motion's high-efficiency useScroll hook.
Commonly placed at the very top of documentation articles, blog templates, or pinned in a dashboard viewport.
Implementation
Usage
Container Bound Previews
Scroll inside the left container below to watch the horizontal gradient bar at the top of the container card and the circular tracker in the right block update smoothly in real time.
Bar Style (Container Bound)
Circular Style (Container Bound)
SCROLL THE LEFT PANEL TO ROTATE
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "bar" | "circle" | "bar" | Visual styling representation (top horizontal line or corner progress dial) |
targetRef | RefObject<HTMLElement> | — | Target scrollable container. Tracks window scroll if undefined |
color | string | "bg-gradient-to-r from-[#FF3903] via-[#FF6107] to-[#FF8A3D]" | Custom tailwind color class or CSS gradient for the bar fill |
height | number | 3 | Height thickness of the horizontal progress line in pixels |
className | string | "" | Additional CSS custom classes |