BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/loomui/reading-progress

Reading Progress

loomui/reading-progress
FreeComponent

A pinned bar that tracks how far through the page, or a chosen element, the reader is.

Live preview

live · rendered by the registry
Rendered by loomui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://loomui.design/r/reading-progress.json

Source

registry/loomui/reading-progress.tsxloomui.design/r/reading-progress.json
1"use client"
2
3import * as React from "react"
4
5import { cn } from "@/lib/utils"
6
7export interface ReadingProgressProps extends React.ComponentProps<"div"> {
8 /** Which edge the bar pins to. */
9 position?: "top" | "bottom"
10 /** Bar thickness in pixels. */
11 thickness?: number
12 /** Measure this element instead of the whole document. */
13 target?: React.RefObject<HTMLElement | null>
14 /** Render nothing. Useful for pages that should not have a bar. */
15 disabled?: boolean
16}
17
18export function ReadingProgress({
19 className,
20 position = "top",
21 thickness = 2,
22 target,
23 disabled = false,
24 style,
25 ...props
26}: ReadingProgressProps) {
27 const ref = React.useRef<HTMLDivElement>(null)
28
29 React.useEffect(() => {
30 if (disabled) {
31 return
32 }
33
34 let frame = 0
35
36 const measure = () => {
37 const node = ref.current
38 if (!node) {
39 return
40 }
41
42 let progress: number
43
44 if (target?.current) {
45 const rect = target.current.getBoundingClientRect()
46 const scrollable = rect.height - window.innerHeight
47 progress = scrollable > 0 ? -rect.top / scrollable : 1
48 } else {
49 const scrollable =
50 document.documentElement.scrollHeight - window.innerHeight
51 progress = scrollable > 0 ? window.scrollY / scrollable : 1
52 }
53
54 // Scrolling is the highest-frequency input there is, so the bar tracks
55 // it exactly. No transition, no easing, no perceived lag.
56 node.style.scale = `${Math.min(Math.max(progress, 0), 1)} 1`
57 }
58
59 const onScroll = () => {
60 cancelAnimationFrame(frame)
61 frame = requestAnimationFrame(measure)
62 }
63
64 measure()
65 window.addEventListener("scroll", onScroll, { passive: true })
66 window.addEventListener("resize", onScroll, { passive: true })
67 return () => {
68 window.removeEventListener("scroll", onScroll)
69 window.removeEventListener("resize", onScroll)
70 cancelAnimationFrame(frame)
71 }
72 }, [disabled, target])
73
74 if (disabled) {
75 return null
76 }
77
78 return (
79 <div
80 data-slot="reading-progress"
81 // Decorative. The scrollbar already carries this information, and a
82 // `progressbar` role without a live `aria-valuenow` announces worse than
83 // nothing at all.
84 aria-hidden="true"
85 className={cn(
86 "pointer-events-none fixed inset-x-0 z-50",
87 position === "top" ? "top-0" : "bottom-0",
88 className
89 )}
90 style={{ height: thickness, ...style }}
91 {...props}
92 >
93// … truncated

What it pulls in

Other registry items

  • utils

Files it writes

  • registry/loomui/reading-progress.tsx

Facts

Registry
loomui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-20
Last confirmed
yesterday

Go to the source

Docs on loomui loomui.design rjcuff/Loom-UI on GitHub Raw registry item This item as JSON

More from loomui

All 91 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Aurora Backdropaurora-backdroploomuiComponentsFreeno deps
Bento Gridbento-gridloomuiComponentsFreeno deps
Card Stackcard-stackloomuiComponentsFreeno deps
Compare Slidercompare-sliderloomuiComponentsFreeno deps
Confetti Buttonconfetti-buttonloomuiComponentsFreeno deps
Count Upcount-uploomuiComponentsFreeno deps
Credit Cardcredit-cardloomuiComponentsFreeno deps
DrawerdrawerloomuiComponentsFree1 dep

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored on what can be checked

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex