The Table of Contents component can be used by importing { TableOfContents } from "finallyreact".
It will automatically search for header elements under a given root id and display them in a list. Clicking a title will scroll to that header.
It will automatically search for header elements under a given root id and display them in a list. Clicking a title will scroll to that header.
Prop Name | Prop Type | Description |
---|---|---|
levelProps | HTMLAttributes | Props for level links |
refId | string | Root level id under which to search for headings |
refresh | string | Refresh the component when this value changes |
simple | boolean | Simple table of contents with no styles |