---
title: "Scroll Progress"
description: "Free React reading progress indicator: a fixed bar or circular ring that follows scroll position with spring smoothing. Framer Motion, shadcn install."
category: "Components"
parent: "https://beui.dev/components/motion/scroll-animation"
publishedAt: "2026-06-24"
updatedAt: "2026-11-10"
documentation: "https://beui.dev/components/motion/scroll-animation/scroll-progress"
markdown: "https://beui.dev/components/motion/scroll-animation/scroll-progress.md"
license: "MIT"
---

# Scroll Progress

> Free React reading progress indicator: a fixed bar or circular ring that follows scroll position with spring smoothing. Framer Motion, shadcn install.

## Install

```bash
npx shadcn@latest add @beui/scroll-progress
```

## Dependencies

- `clsx`
- `lenis`
- `motion`
- `react`
- `tailwind-merge`

## Usage

### Scroll Progress usage

Reading-progress indicator (fixed bar or circular ring) driven by scroll position via useSmoothScroll, with spring smoothing.

```tsx
"use client";

import { useScroll } from "motion/react";
import { useRef } from "react";

import { ScrollProgress } from "@/components/motion/scroll-progress";

// Real usage: drop <ScrollProgress /> anywhere — it reads page scroll via
// useSmoothScroll and pins itself with `fixed`. Here we scope it to a box by
// passing a contained `progress` source and `fixed={false}`.
const SECTIONS = Array.from({ length: 18 }, (_, i) => i + 1);

export function ScrollProgressPreview() {
  const ref = useRef<HTMLDivElement>(null);
  const { scrollYProgress } = useScroll({ container: ref });

  return (
    <div className="relative w-full max-w-lg overflow-hidden rounded-2xl border border-border bg-card">
      <ScrollProgress progress={scrollYProgress} fixed={false} height={3} />
      <div className="absolute right-3 top-3 z-10 rounded-full bg-background/70 p-1 backdrop-blur">
        <ScrollProgress variant="circle" progress={scrollYProgress} size={36} />
      </div>
      <div ref={ref} className="h-64 overflow-y-auto scrollbar-hide">
        <div className="space-y-3 p-4">
          {SECTIONS.map((n) => (
            <div
              key={`row-${n}`}
              className="rounded-2xl bg-muted/60 px-3 py-4 text-sm text-muted-foreground"
            >
              Section {n}
            </div>
          ))}
        </div>
      </div>
    </div>
  );
}
```

## API Reference

### ScrollProgress

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `variant` | `"circle" \| "bar"` | — | No | A thin horizontal bar, or "circle" for a ring. Default: "bar" |
| `position` | `"top" \| "bottom"` | — | No | Edge the bar sits on. Default: "top" |
| `height` | `number` | — | No | Bar thickness in px. |
| `fixed` | `boolean` | — | No | Position the bar with `fixed` (page) or `absolute` (embedded). |
| `progress` | `MotionValue<number>` | — | No | Override the scroll source. Defaults to the page via useSmoothScroll. |
| `spring` | `boolean` | — | No | Spring-smooth the value. Disabled automatically under reduced motion. |
| `className` | `string` | — | No | Classes merged onto the root element. |
| `size` | `number` | — | No | Diameter in px. |
| `thickness` | `number` | — | No | Stroke width in px. |

## More in Scroll Animation

- [Smooth Scroll](https://beui.dev/components/motion/scroll-animation/smooth-scroll.md)
- [Parallax Scroll](https://beui.dev/components/motion/scroll-animation/parallax.md)
- [Scroll To Button](https://beui.dev/components/motion/scroll-animation/scroll-to.md)
- [Scroll Reveal](https://beui.dev/components/motion/scroll-animation/scroll-reveal.md)

## Source

- Registry detail: https://beui.dev/r/scroll-progress
- Raw source: https://beui.dev/r/scroll-progress/raw
- GitHub: https://github.com/starc007/ui-components
