Skip to content

Scroll Progress

Reading-progress indicator for the page or a single article, as a thin bar across the top or a small ring with a percentage.

Installation

pnpm dlx shadcn@latest add @portfolio-kit/scroll-progress
First time? Add the @portfolio-kit registry to components.json
components.json
{
  "registries": {
    "@portfolio-kit": "https://www.parthjadhav.com/products/portfolio-kit/r/{name}.json"
  }
}

Usage

Examples

Ring

A small floating ring with the percentage inside, for long reads where a bar would clash with a sticky header.

Article Only

Pass targetRef to measure one article instead of the whole page. The bar stays empty through the intro and is full when the article ends.

Static Values

position="static" with a value turns it into a plain progress meter — for chapter lists, reading queues and course progress.

API Reference

Used in