TableOfContents

A scroll-spy navigation sidebar that scans a content container for h2/h3 headings and links to each one, bolding whichever section is currently in view.

Installation

npx dafink-ui add table-of-contents

Demo

Overview

A short introduction to the section.

Getting started

Steps to get up and running.

Advanced usage

Additional configuration options.

Props

NameTypeDefaultDescription
containerIdstring'docs-content'The id of the element to scan for h2/h3 headings.
labelstring"What's on this page?"Heading text rendered above the list of links.
classNamestring''Additional classes applied to the wrapping nav element.