TableOfContents
Lists the sections of one long page, such as a report, shows which one is being read and jumps to a section on click — reach for Tabs or SegmentedTabs when only one section shows at a time, and Stepper when the sections are steps of a flow. It never tracks scrolling itself: the page passes the active value, usually from the useScrollSpy hook, and the corner button switches to the Minimized view of dashes, whose popover opens on hover or tap.
Usage
Examples
Numbered
The page passes each number itself — nothing is counted — and it stays on the first line.
Levels
Two levels at most: level={2} indents a subsection under its parent on the same rail.
Minimized
A dash per section, longest for the active one; hover or tap the dashes to read the rows in a popover.
Long labels
Labels wrap to two lines, then end in an ellipsis; the rail grows with the row.
Long list
The list scrolls inside the height its parent gives it, while the header stays put.
With scroll spy
The usual wiring: useScrollSpy reads the scrolling container and feeds value and scrollTo back in.
With segmented tabs
The same hook drives any control that takes a value — here SegmentedTabs across the top of the page.