Skip to content

Table Of Contents

Scrollspy navigation for case studies and articles, as a rail with a moving marker or a plain list. Clicking scrolls to the heading and updates the URL hash.

Installation

pnpm dlx shadcn@latest add @portfolio-kit/table-of-contents
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

Numbered List

The quieter list variant, composed from TableOfContentsItems so you can add your own chapter numbers.

API Reference

Used in