---
title: "AutoTOC"
canonical_url: "https://framerhub.io/components/auto-toc"
last_updated: "2026-11-09T16:24:40.987Z"
---

## AutoTOC

A table of contents for blog posts and docs pages that builds itself. It reads the H2 and H3 headings on the page and highlights the current section as the reader scrolls.

## Features

**Builds itself.** Drop it on the page and it finds every `<h2>` and `<h3>`. No manual links.

**Scroll tracking.** The section the reader is in stays highlighted.

**Collapsible subsections.** H3 entries can collapse when their section isn't in view.

**Styles.** Fonts, colors, hover and active states for both H2 and H3 entries.

## Use Cases

**Blog posts.** Long articles readers want to jump around in.

**Documentation.** Technical docs, API references and knowledge bases.

**Landing pages.** Long pages with many sections.

![AutoTOC Preview](/framerhub/img/components/control/auto-toc.jpg)

## How to Use

### Customization

**Layout**

- Gap between items
- Indentation for H3 subsections

**H2/H3 Styles**

- Font family, size, and weight
- Default, hover, and active colors
- Background colors and padding

**Collapsible Mode**

- Toggle collapsible subsections
- Auto-collapse options

### Quick Tips

**Sticky sidebar.** Put the component in a sticky sidebar so it stays visible while readers scroll.

**Real headings.** Use proper H2 and H3 text styles in Framer, or the component can't find them.

**Preview mode.** Real headings only appear in Preview and on the published site. The canvas shows placeholder entries.

**Dark mode.** Set colors for both light and dark themes with the color controls.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
