Article layout with a sticky right sidebar table of contents featuring a squircle highlight tracking the currently scrolled section

Auto-Generated Anchor Positioned TOC

This is an Auto-Generated Anchor Positioned TOC. It parses an article’s heading structure on the fly and constructs a sticky navigation menu. Its primary function is to replace heavy JavaScript scroll-spies (Intersection Observers) with native CSS Anchor Positioning and Scroll Targeting, moving an animated highlight alongside the active content section. (Requires: Tweakpane, GSAP)

Technologies:
HTML CSS Babel
Difficulty: Intermediate
Browser Support (as of Mar 2026):
Chrome Chrome 125+ Edge Edge 125+
Features:
DOM Parsing Anchor Positioning Scroll Tracking Squircle Shape
Code by: Jhey Jhey
License: MIT
Dynamic Active Table of Contents

Dynamic Active Table of Contents

A convenient navigation for long-reads or documentation that automatically structures content and visually indicates the user’s current section.