AtroUIAtroUI
  • Getting Started
  • Installation
  • MCP server
  • Coming from…
  • Collections
  • Registry
  • Theming
  • Host APIs
  • Brand kit
  • Identity kit
  • Landing kit
  • Launch workflow
  • For agents
  • Glossary
  • Compare
  • Alternatives hub
  • vs Aceternity UI
  • vs Magic UI
  • Aceternity alternative
  • Magic UI alternative
  • Tailwind Plus alternative
  • Changelog
  • Blog
  • Updates
  • ButtonCLI
  • DialogCLI
  • Alert DialogCLI
  • MenuCLI
  • Context MenuCLI
  • Navigation MenuCLI
  • MenubarCLI
  • PopoverCLI
  • TooltipCLI
  • Preview CardCLI
  • Scroll AreaCLI
  • SeparatorCLI
  • FieldCLI
  • Number FieldCLI
  • OTP FieldCLI
  • FormCLI
  • FieldsetCLI
  • InputCLI
  • TextareaCLI
  • CheckboxCLI
  • Checkbox GroupCLI
  • RadioCLI
  • SwitchCLI
  • ToggleCLI
  • Toggle GroupCLI
  • ToolbarCLI
  • AccordionCLI
  • CollapsibleCLI
  • ComboboxCLI
  • AutocompleteCLI
  • DrawerCLI
  • TabsCLI
  • ToastCLI
  • ProgressCLI
  • SliderCLI
  • MeterCLI
  • AvatarCLI
  • CardCLI
  • Form SelectCLI
  • Motion PlaygroundCLI
  • BreadcrumbsCLI
  • ProseCLI
  • Founder AvatarCLI
  • Theme ToggleCLI
  • Adaptive Theme SwitchCLI
  • Theme ProviderCLI
  • LogoCLI
  • TimelineCLI
  • Fade InCLI
  • StaggerCLI
  • Line RevealCLI
  • Word Reveal ScrollCLI
  • Text MorphCLI
  • Copy ButtonCLI
  • Label RollCLI
  • MagneticCLI
  • TiltCLI
  • SpotlightCLI
  • Animate NumberCLI
  • Transition PanelCLI
  • Scroll ProgressCLI
  • ASCII
  • DonutCLI
  • RainCLI
  • WaveCLI
  • SparkCLI
  • BarCLI
  • BootCLI
  • WordmarkCLI
  • DecodeCLI
  • Site HeaderCLI
  • Site FooterCLI
  • Bold FooterCLI
  • HeroCLI
  • PrincipleCLI
  • WorkCLI
  • CraftsCLI
  • LabCLI
  • WhoCLI
  • PricingCLI
  • Feature GridCLI
  • Logo CloudCLI
  • FAQCLI
  • Contextual CTACLI
  • Exit IntentCLI
  • Calendly EmbedCLI
  • Waitlist FormHost API
  • Newsletter FormHost API
  • JournalCLI
  • Social ShareCLI
  • ResourcesCLI
  • AR PortfolioCLI
  • Made With EmbedCLI
  • Hero ParallaxCLI
  • Hero LampCLI
  • Logo MarqueeCLI
  • Testimonials StackCLI
  • Feature BentoCLI
  • CTA BandCLI
  • Pricing TiersCLI
  • FAQ AccordionCLI
  • Stats BandCLI
  • Integration BeamCLI
  • Showcase CarouselCLI
  • Auth SplitCLI
  • SaaS StarterCLI
  • Landing KitCLI
  • OG ExamplesCLI
  • OG Live PreviewCLI
  • OG WorkspaceHost API
  • Thumbnail PreviewCLI
  • Thumbnail WorkspaceHost API
  • Project PlannerCLI
  • Scope ChatHost API
  • Launch WorkflowCLI
  • Live DashboardCLI
  • Analytics ProviderCLI
AtroUI·Home·Components·Blog·GitHub·Changelog

Primitive · CLI

Scroll Progress

Reading-progress bar. Direct scrollYProgress → scaleX by default; optional soft spring. Reduced motion hides the bar.

Preview

$npx shadcn@latest add @atroui/scroll-progress

ScrollProgress

Scroll the panel — scaleX tracks progress directly (no spring lag).

Reading pane

Section 1. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 2. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 3. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 4. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 5. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 6. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 7. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 8. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 9. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 10. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 11. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Section 12. Production mounts fixed at the viewport top and binds scrollYProgress → scaleX. Pass springOptions only if you want a soft settle. Reduced motion hides the bar.

Installation

Agent blurb — install command + no npm UI rule. For agents

$npx shadcn@latest add @atroui/scroll-progress

Source lands in your repo. Installation · Registry

Usage

Usually fixed to the top of the viewport with bg-brand. Default is compositor-only (no spring).
tsx
import { ScrollProgress } from "@/components/motion-primitives/scroll-progress"

{/* Production: fixed on viewport — direct scaleX */}
<ScrollProgress className="fixed inset-x-0 top-0 h-0.5 bg-brand" />

{/* Opt-in soft spring */}
<ScrollProgress springOptions={{ stiffness: 120, damping: 28 }} />

{/* Docs: tracks a local scroll container */}
<ScrollProgress containerRef={ref} />

API reference

PropTypeDefaultDescription
classNamestring-Positioning + color classes (e.g. fixed, bg-brand).
containerRefRefObject<HTMLDivElement>-Scroll container. Defaults to the document.
springOptionsSpringOptions-Opt-in soft spring on scaleX. Omit for direct scroll binding.
Related
  • Button
  • Dialog
  • Alert Dialog
  • Menu

Scroll Progress

PreviousTransition PanelNextASCII
import { ScrollProgress } from "@/components/motion-primitives/scroll-progress"

{/* Production: fixed on viewport — direct scaleX */}
<ScrollProgress className="fixed inset-x-0 top-0 h-0.5 bg-brand" />

{/* Opt-in soft spring */}
<ScrollProgress springOptions={{ stiffness: 120, damping: 28 }} />

{/* Docs: tracks a local scroll container */}
<ScrollProgress containerRef={ref} />