# TOC

On-this-page navigation — scroll-spy with animated active indicator and depth-aware indentation.

**Install:** `nimbus-docs add toc`  
**Source:** `src/components/ui/toc/`  
**Canonical:** https://nimbus-docs.com/components/toc/

## Agent payload (JSON)

```json
{
  "slug": "toc",
  "name": "TOC",
  "description": "On-page table of contents with active-heading tracking.",
  "tagline": "On-this-page navigation — scroll-spy with animated active indicator and depth-aware indentation.",
  "install": "nimbus-docs add toc",
  "sourcePath": "src/components/ui/toc/",
  "canonicalUrl": "https://nimbus-docs.com/components/toc/",
  "props": [
    {
      "name": "headings",
      "type": "TOCItem[]",
      "required": true,
      "description": "Flat list of `{ depth, text, slug }` — usually from `getTOC(entry)`."
    }
  ],
  "registryDependencies": [
    "cn"
  ],
  "dependencies": []
}
```
