FreeWidget

Table of Contents widget documentation

Table of Contents lists the headings found on the same page. Add it once, next to or above the content it describes.

Overview

The Xtra Table of Contents is a free Elementor widget that builds a clickable outline from the headings already on the page. Choose which heading levels to list, from H2 down to H6, and the widget nests them, numbers them (1., 1.1, 1.2) and adds a smooth-scrolling link to each one.

While visitors read, the active section is highlighted using the browser's IntersectionObserver, with an optional sliding indicator line and a reading progress bar. The table can be collapsible, sticky while the page scrolls, and topped with a Back to top link.

Three looks are built in: a boxed card, a minimal list and a sidebar rail with an indicator line. You can scan the Elementor content of the page, the theme's main content area or any CSS selector, include or exclude headings by selector, and hide a single heading by giving it a class.

You will find the widget in the Elementor panel under the Xtra widgets, or search for “Table of Contents”. It is part of the free Xtra Addons for Elementor plugin — see the Table of Contents widget page for live demos.

Quick start

  1. Make sure the page has real headings, for example Elementor Heading widgets set to H2 and H3.
  2. Drag the Table of Contents widget into a sidebar column or above your content.
  3. Under Content → Content Source, set Find Headings In and pick the Heading Levels to list.
  4. Under Content → Display, choose the Look, the Markers, and the Title. Turn on Collapsible, Back To Top Link or Indicator Line if you need them.
  5. Under Content → Scrolling & Highlight, keep Highlight Active Section on, set the Scroll Offset (px) and choose a Reading Progress Bar and the Position (Normal or Sticky).
  6. To hide one heading, add the class no-toc to it (Advanced → CSS Classes), or use Exclude (selector).
  7. Style it in the Style tab: Container, Title, Links, Numbers / Bullets, Indicator Line, Progress Bar and Back To Top.

Options reference

All 94 options of the Table of Contents widget, as they appear in the Elementor panel. Many options are responsive and can be set separately for desktop, tablet and mobile.

Content tab 31 options

Content Source

OptionTypeValues and notes
Find Headings In Select This page's Elementor contentTheme main content areaCustom CSS selector Headers, footers and the table itself are always ignored.
CSS Selector Text Comma-separated selectors of the container(s) to scan.
Heading Levels Multi-select H2H3H4H5H6
Only Include (selector) Text Optional. When set, only headings that match, or sit inside, these selectors are listed.
Exclude (selector) Text Headings that match, or sit inside, these selectors are skipped.
Ignore Headings With Class Text Add this CSS class to any heading (or its wrapper) to hide it from the table. Several classes: separate with spaces or commas.
Skip Hidden Headings On / off Ignores headings inside hidden tabs, responsive-hidden elements, etc.
Minimum Headings To Show Number On the live page the table hides itself when fewer headings are found. In the editor you always see a placeholder.

Display

OptionTypeValues and notes
Look Select Boxed cardMinimalSidebar rail with indicator line
Show Title On / off
Title Text
Title HTML Tag Select divpH2H3H4H5H6
Title Icon Icon
Markers Select Numbers (1., 1.1, 1.2)BulletsNone
Indicator Line On / off A line that slides to the active section. Always on for the Sidebar rail look.
Collapsible On / off
Collapsed By Default On / off
Collapse On Mobileresponsive On / off
Toggle Button Label (screen readers) Text
Back To Top Link On / off
Link Text Text
Navigation Label (accessibility) Text Announced by screen readers as the name of this navigation landmark.

Scrolling & Highlight

OptionTypeValues and notes
Highlight Active Section On / off Marks the section you are reading (aria-current) using IntersectionObserver, no scroll listener.
Highlight Zone Height (%) Slider A heading becomes active when it enters the top part of the screen (below the offset).
Smooth Scrolling On / off Automatically disabled for visitors who prefer reduced motion.
Scroll Offset (px)responsive Slider Space kept above the heading after jumping to it. Add your sticky header height here, or let the widget detect it below.
Detect Fixed Header On / off Adds the height of a fixed or sticky header to the offset automatically.
Update URL Hash On Click On / off
Reading Progress Bar Select OffInside the tableTop of the page
Positionresponsive Select NormalSticky (floating) Sticky keeps the table in view while its parent column scrolls. The parent must be taller than the table and must not use overflow: hidden.
Sticky Top Gap (px)responsive Slider

Style tab 63 options

Container

OptionTypeValues and notes
Backgroundresponsive Background Classic color or image, gradient, video and slideshow backgrounds with position, size and effects.
Border Type Select DefaultNoneSolidDoubleDottedDashedGroove
Border Widthresponsive Dimensions
Border Color Color
Border Radiusresponsive Dimensions
Box Shadow Box shadow
Paddingresponsive Dimensions
Max Widthresponsive Slider

Title

OptionTypeValues and notes
Typographyresponsive Typography Font family, size, weight, transform, style, decoration, line height, letter spacing and word spacing.
Color Color
Icon Color Color
Icon Sizeresponsive Slider
Icon Spacingresponsive Slider
Border Type Select DefaultNoneSolidDoubleDottedDashedGroove
Border Widthresponsive Dimensions
Border Color Color
Paddingresponsive Dimensions
Space Below Headerresponsive Slider

Toggle Button

OptionTypeValues and notes
Icon Color Color
Background Color
Border Type Select DefaultNoneSolidDoubleDottedDashedGroove
Border Widthresponsive Dimensions
Border Color Color
Button Sizeresponsive Slider
Icon Sizeresponsive Slider
Border Radiusresponsive Dimensions

List Layout

OptionTypeValues and notes
Space Between Itemsresponsive Slider
Indent Per Levelresponsive Slider
Max Height (scrolls when taller)responsive Slider
List Paddingresponsive Dimensions

Links

OptionTypeValues and notes
Typographyresponsive Typography Font family, size, weight, transform, style, decoration, line height, letter spacing and word spacing.
Text Color Color
Background Color
Font Weight Select 400500600700800Default
Paddingresponsive Dimensions
Border Radiusresponsive Dimensions
Transition Duration (s) Slider

Numbers / Bullets

OptionTypeValues and notes
Typographyresponsive Typography Font family, size, weight, transform, style, decoration, line height, letter spacing and word spacing.
Color Color
Bullet Color Color
Active Color Color
Active Bullet Color Color
Space After Markerresponsive Slider
Bullet Sizeresponsive Slider

Indicator Line

OptionTypeValues and notes
Track Color Color
Indicator Color Color
Line Widthresponsive Slider

Progress Bar

OptionTypeValues and notes
Heightresponsive Slider
Backgroundresponsive Background Classic color or image, gradient, video and slideshow backgrounds with position, size and effects.
Track Color Color
Border Radiusresponsive Dimensions
Distance From Topresponsive Slider

Back To Top

OptionTypeValues and notes
Typographyresponsive Typography Font family, size, weight, transform, style, decoration, line height, letter spacing and word spacing.
Color Color
Hover Color Color
Border Type Select DefaultNoneSolidDoubleDottedDashedGroove
Border Widthresponsive Dimensions
Border Color Color
Paddingresponsive Dimensions
Marginresponsive Dimensions

Sticky State

OptionTypeValues and notes
Box Shadow Box shadow
Backgroundresponsive Background Classic color or image, gradient, video and slideshow backgrounds with position, size and effects.
Z-Index Number

Tips

  • On the live site the table hides itself when fewer headings than Minimum Headings To Show (2 by default) are found. In the editor you see a placeholder instead.
  • Sticky only works when the table's parent column is taller than the table and does not use overflow: hidden.
  • If your theme has a fixed header, keep Detect Fixed Header on or add its height to the Scroll Offset so headings are not hidden under it.
  • Use one H1 for the page title and start the table at H2 so the page title is not listed.

Frequently asked questions

Is the Xtra Table of Contents widget free?

Yes. Table of Contents is included in the free Xtra Addons for Elementor plugin. No Elementor Pro is required.

How does the table of contents find my headings?

It scans the page in the browser. By default it looks at this page's Elementor content; you can switch to the theme's main content area or a custom CSS selector, and choose which heading levels (H2 to H6) to list.

How do I leave a heading out of the table?

Give the heading the CSS class no-toc, or change the class under Ignore Headings With Class. You can also use the Exclude (selector) field.

Does it highlight the section I am reading?

Yes. Highlight Active Section is on by default and marks the current link with aria-current. You can also show a sliding indicator line or a reading progress bar.

Can the table follow the reader while scrolling?

Yes. Set Position to Sticky (floating) and choose the Sticky Top Gap. The table stays in view while its parent column scrolls.

Why is the table not showing on my page?

On the live page it hides itself when it finds fewer headings than Minimum Headings To Show (2 by default). Check that the page has headings of the selected levels and that they are inside the area being scanned.

See the Table of Contents widget in action

Live demos, features and use cases are on the widget page.

Open widget page