Finsweet Attributes: Table of Contents Webflow integration
Connect Finsweet Attributes: Table of Contents with Webflow to generate automatic, clickable tables of contents from your heading elements.
How to integrate Finsweet Attributes: Table of Contents with Webflow
Finsweet Table of Contents generates clickable anchor links from your heading elements using a custom code embed and HTML attributes. This integration is client-side only; it does not sync data with external services or use Webflow's APIs.
The primary method is to add the script and configure attributes, which covers the basic setup for most use cases.
Add the script and configure attributes
The integration works entirely through Webflow after you add one script tag. Embed the library in your page head code, then use Element Settings to mark which elements contain headings and which elements serve as navigation links.
Add this script to your page's Custom Code section under Head Code:
<script async type="module" src="https://cdn.jsdelivr.net/npm/@finsweet/attributes@2/attributes.js" fs-toc></script>
Then apply these attributes through Webflow's Element Settings panel:
- Mark your content container: Add
fs-toc-element="contents"to the Rich Text Block or Div Block containing your headings - Mark your navigation links: Add
fs-toc-element="link"to the link elements that serve as your TOC template - Configure scroll behavior (optional): Add
fs-toc-offsettopandfs-toc-offsetbottomattributes with CSS values (e.g.,"80px") to the contents element to control scroll offset for fixed headers - Enable interaction triggers (optional): Add
fs-toc-element="ix-trigger"to Div elements inside heading wrappers to integrate with Webflow's interaction system
The script automatically generates anchor links for each heading and populates your navigation template. TOC generates items from H2–H6 headings only; H1 tags are excluded.
You can configure scroll behavior for fixed headers using these attributes on the contents element:
fs-toc-offsettop: Adds pixel offset above the target heading during scroll (use "80px" for an 80px fixed header)fs-toc-offsetbottom: Adds pixel offset below the target heading during scrollfs-toc-hideurlhash="true": Prevents the URL hash from appearing in the browser address bar
To exclude specific headings from the TOC, add [fs-toc-omit] to the heading text.
The script automatically applies Webflow's .w--current class to the active TOC link as users scroll. Select your link element in Webflow, access the Current state in the Style panel, and apply your active styling.
Note that TOC functionality requires the script to execute, which does not happen in Webflow's preview mode. Publish to staging or production to test the navigation behavior.
Set up multiple TOC instances
When your page needs separate tables of contents for different content sections, use unique suffixes on your attribute values. All related elements must share the same suffix.
For a footer TOC:
<div fs-toc-element="contents-footer">...</div>
<a fs-toc-element="link-footer">...</a>
Each instance uses unique attribute suffixes (such as contents-1 and contents-2) to distinguish its navigation generation from the designated content container. Test thoroughly on the published site, as multiple TOCs targeting the same content can behave unexpectedly in some layouts.
Implement with CMS template pages
The TOC works with CMS-driven content, though there are known limitations with how CMS Rich Text fields structure headings. The TOC is designed for a single Rich Text or content element; complex CMS layouts may prevent the script from correctly detecting headings.
For CMS templates:
- Apply
fs-toc-element="contents"directly to your Rich Text element or Div Block containing your heading elements - Create link elements with
fs-toc-element="link"to serve as your TOC navigation template - Test with actual published content, as TOC functionality only operates on published sites
- If headings aren't detected, verify your CMS content structure doesn't add extra wrapper elements around headings
This is a known limitation discussed in the Finsweet community. The TOC does not support generating navigation across multiple separate CMS items on a single page.
Add interaction triggers
Finsweet Table of Contents supports Webflow interactions through the fs-toc-element="ix-trigger" attribute. Add a Div element inside your heading wrapper and apply this attribute to trigger IX2 animations when table of contents sections become active during scrolling. This pattern works best for teams familiar with Webflow's IX2 interaction system.
What you can build
Integrating Finsweet Table of Contents with Webflow lets you generate automated navigation for long-form, structured content.
- Documentation sites with hierarchical navigation: Build product documentation where users access nested sections through an auto-generated sidebar TOC
- Blog posts with sticky section navigation: Create long-form articles where a fixed TOC highlights the current section as readers scroll
- Educational course pages with lesson outlines: Build course modules where learners see a structured outline of lesson sections and jump to specific topics
- Resource libraries with scannable content: Create knowledge base articles where users can quickly scan the heading structure and access relevant information directly
Frequently asked questions
Add the script tag to your page's Custom Code section under Head Code in Webflow's page settings. You can also add it at the site level through Site settings to apply site-wide. The script loads asynchronously with
async type="module"to prevent blocking page rendering. After adding the script, apply attributes through Webflow's Element Settings panel. See the official Finsweet Table of Contents documentation for complete setup instructions.No. TOC generation only includes H2–H6 headings; H1 is excluded. This aligns with the Webflow semantic HTML guidance and W3C standards, which reserve H1 for the main page title. Structure your content with H1 for the page title (outside the TOC) and H2–H6 for sections within the TOC content area
The script automatically applies Webflow's native
.w--currentclass to the active link during scroll. Select your TOC link element in Webflow, access the Current state in the Style panel, and apply your desired styling. The active state triggers based on scroll position and respects any offset settings you've configured. Active state tracking can occasionally jump to the next heading when headings are positioned close together vertically; adjusting yourfs-toc-offsettopvalue may help.Style the Finsweet Attributes: Table of Contents entirely through Webflow's Designer interface using the Style panel. The tool automatically applies the .
w--currentclass to active TOC links for styling, and you have complete control over typography, colors, spacing, and layout through visual style controls. Webflow's documentation on custom styling provides guidance on adding CSS properties not available in the Style panel for advanced customization like scroll offset configuration.Finsweet Attributes: Table of Contents automatically generates a navigable table of contents by scanning Rich Text elements for heading tags (H2-H6). Configure the tool entirely through Webflow Designer using HTML attributes: addfs-toc-element="contents"to the container with your content, andfs-toc-element="link"to link elements in your TOC navigation. Style the TOC using Webflow's native design tools—add custom CSS through the Style panel or embed elements for advanced styling like active link borders, then apply Webflow's Current state to highlight the active section during scroll.
Description
Finsweet Table of Contents is a JavaScript-powered attribute system that parses heading elements (H2–H6) within Webflow Rich Text or Div Blocks and generates clickable anchor links. The system handles smooth scrolling and active-section highlighting via Webflow's native Current state, and supports multiple independent TOC instances per page.
This integration page is provided for informational and convenience purposes only.

FlowScribe
Connect FlowScribe, a programmatic SEO tool, with Webflow to generate and publish hundreds of AI-powered, SEO-ready pages directly to your CMS without coding.

Quilly
Connect Quilly with Webflow to automate AI-powered content creation and publishing directly to your CMS collections.

AutoLink
Connect AutoLink AI with Webflow to automate internal linking across your site.

BlogSEO AI
Connect BlogSEO AI to Webflow through OAuth-authenticated REST API integration for publishing AI-generated content directly to CMS Collections.

Goaffpro Affiliate Marketing
Connect Goaffpro with Webflow to track affiliate sales, manage commissions, and build custom branded affiliate portals on your site.

Hypotenuse AI
Connect Hypotenuse AI to Webflow for one-click blog content export with automatic field mapping.

Krastie AI
Connect Krastie AI, an AI-powered content creation platform, with Webflow to transfer AI-generated content to your CMS through Make, Zapier, CSV imports, or custom API scripts.

Hipa.ai
Connect Hipa.ai, an AI-powered blog content automation tool, with Webflow to automatically update and maintain your blog posts. Hipa.ai keeps your content current with 24/7 automated updates to published articles.

Text Wizard AI
Connect Text Wizard AI by Modulify with Webflow to add AI-powered text processing capabilities directly in the Webflow Designer through a marketplace app.


