Scroll Progress

Motion

A React scroll progress indicator with a thin top bar and a circular percent ring, smoothed by a spring, that tracks the window or any scrollable container you pass.

src/registry/premium/scroll-progress.tsx/r/scroll-progress.json

Installation#

bash
npx shadcn@latest add @minidev/scroll-progress

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/scroll-progress.json

Usage#

tsx
import { ScrollProgress } from "@/components/ui/scroll-progress"

export function Example() {
  return <ScrollProgress />
}

API reference#

ScrollProgress props
PropTypeDefault
variant"bar" | "circle" | "both""both"
containerReact.RefObject<HTMLElement | null>-
fixedbooleanfalse
heightnumber3
sizenumber40
childrenReact.ReactNode-
titleReact.ReactNode"What is new in Lumen 3.0"
subtitleReact.ReactNode"Release notes · 4 min read"
classNamestring-

Dependencies#

npm

motion

Built from

No other MiniDev files
All Animated React components

Learn more