TOC
Table of Content
A Table of Contents with active anchor observer and auto scroll.
Usage
Anchor Provider
Watch for the active anchor using the Intersection API.
Prop | Type | Default |
---|---|---|
toc | TableOfContents | - |
children | ReactNode | - |
Scroll Provider
Contains all TOC items. It automatically scrolls to the active anchor.
Prop | Type | Default |
---|---|---|
containerRef | RefObject<HTMLElement> | - |
children | ReactNode | - |
TOC Item
The item to jump to the anchor.
Data Attribute | Values | Description |
---|---|---|
data-active | true, false | Is anchor active |
Last updated on