Reading Progress + TOC
A spring-smoothed reading bar and a sticky table of contents that lights the section on screen, with a live “min left” estimate — made for long-form blog posts.
Try it: Scroll the article — the bar fills and the contents follow.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/reading-progress-toc.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/reading-progress-toc. You can also copy the source into components/ui/reading-progress-toc.tsx (view on GitHub).
Usage
import { ReadingProgressToc } from '@/components/ui/reading-progress-toc'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
title / meta | string | — | Article heading and meta line. |
sections | { id, title, paragraphs[] }[] | 4 sections | Article content. |
scrollContainer | React.RefObject<HTMLElement | null> | window | Scroll element when the component lives inside its own scroller. |
wpm | number | 220 | Words per minute for the estimate. |
className | string | — | Extra classes merged onto the root. |
Dependencies
motion
Related Portfolio components
- Résumé Download Button
The document glyph prints itself line by line, then drops into a tray as the file downloads and the label settles on “Saved”. Live status for screen readers.
- Intro Preloader
Greeting words flick by while a big counter climbs 0→100, then the ink curtain lifts with a trailing curve that flattens as it leaves and the page settles from a slight zoom. Skippable.
- Services Cards
Four offers in one row: hover or focus a card and it swells while the others yield; a cursor-lit border follows the pointer, the icon tile tilts and deliverables stagger in with ticking checks.
- Project Lightbox
Thumbnails open into a detail modal through a shared-element morph — artwork flies from its tile to the hero slot while copy staggers in. Focus trapped and restored, Esc closes, ←/→ browse.
- Scroll Reveal
A wrapper that animates its content in on scroll: seven effects (rise, fade, blur, scale, clip, slide-left/right), optional child staggering, any scroll container, and a no-motion fallback.
- Section Spy Nav
Sticky in-page navigation that follows your reading position: a shared pill springs between links as sections cross the reading line, a hairline fills with overall progress, and clicks glide and…