.finally(React)

English
Copyright © 2023-currentdotfinally, LLC

Table of Contents

Easy scrolling

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.

Example

Example

Simple

Simple

TableOfContents Props

Prop NameProp TypeDescription
levelPropsHTMLAttributesProps for level links
refIdstringRoot level id under which to search for headings
refreshstringRefresh the component when this value changes
simplebooleanSimple table of contents with no styles