Introduction
Some intro copy here.
Installation
Steps to install.
Peer dependencies
Nested headings bend the rail across with a rounded elbow.
Usage
How to use the component.
Auto-generated "On this page" navigation that tracks every heading currently on screen. Powers the right rail of every UI Library doc page, plus the sticky collapsible bar you see on mobile.
Point it at a container; ScrollSpy finds h2-h6 inside and renders a nav. Every heading that is visible lights up at once, and the rail spans the whole range. Nested headings indent and the rail bends across to meet them.
Some intro copy here.
Steps to install.
Nested headings bend the rail across with a rounded elbow.
How to use the component.
| Prop | Type | Default | Description |
|---|---|---|---|
contentSelector | string | — | CSS selector for the container ScrollSpy walks for headings. |
excludeSelector | string | "" | Skip headings whose closest match this selector (e.g. "[role=tabpanel]"). |
showLabel | boolean | true | Show the label row above the nav. |
label | string | "On this page" | Text of the label row. |
| Event | Description |
|---|---|
headings-found | Emitted on mount with the resolved headings array. |
| Prop | Type | Default | Description |
|---|---|---|---|
contentSelector | string | — | CSS selector for the container ScrollSpy walks for headings. |
excludeSelector | string | "" | Skip headings whose closest match this selector (e.g. "[role=tabpanel]"). |
title | string | "On this page" | Shown on the trigger while no heading is in view — usually the page title. |
| Event | Description |
|---|---|
headings-found | Emitted on mount with the resolved headings array. |
Keyboard shortcuts and ARIA behavior.