Skip to content
Premium & Brand

Scroll Progress

A bar or ring that tracks how far a scroll container has been read.

Import

tsx
import { ScrollProgress } from "@cronus-ui/ui";
bash
npx cronus-ui add scroll-progress

Examples

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component ScrollProgressDefault layout:inline style:scroll-progress {
  value:40
  aria-label:"Scroll progress"
  label "Scroll progress"
}

page "/audit/scroll-progress/default" type:custom {
  use ScrollProgressDefault
}

API Reference

Generated from the component's exported types.

ScrollProgressProps

Extends HTMLAttributes<HTMLDivElement>

Skip ScrollProgressProps props table
PropTypeDefaultDescription
variant
ScrollProgressVariant"bar"Render a thin horizontal bar or a circular ring.
target
RefObject<HTMLElement | null>—The scroll container to track. When omitted, the window / document scrolling element is tracked instead.
position
ScrollProgressPosition"top"Where to pin the bar variant (ignored for the circle).
size
number40Diameter of the ring in px (circle variant only).
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.