Article table of contents with reading progress in WordPress
A sticky sidebar table of contents for blog posts: it highlights the section being read, shows the reading time left and folds into a list under the title on mobile.
Here is an excerpt of this component's code in WordPress. The full code is free for members, ready to copy into your project.
This component also comes in
The code in WordPress
<?php
/**
* Plugin Name: Forge, Sommaire d’article avec progression
* Description: Un sommaire latéral collant pour les articles de blog : il surligne la section lue, indique le temps de lecture restant et se replie en liste sous le titre sur mobile. Ajoute la composition « Sommaire d’article avec progression » à l'éditeur de blocs.
* Version: 1.0.0
* Requires at least: 6.6
* Requires PHP: 8.1
* Author: Forge
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: forge-navigation-sommaire-article-progression
*<!-- wp:html -->
<article class="nsap" data-nsap data-nsap-pace="200">
<header class="nsap-head">
<p class="nsap-kicker">Entretien extérieur</p>
<h1 class="nsap-h1">Entretenir une terrasse en bois avant l’hiver</h1>
<p class="nsap-lead">Une demi-journée en automne suffit à garder des lames saines pendant des années. Voici les bons gestes, dans l’ordre, et les erreurs qui coûtent cher.</p>
<p class="nsap-meta">Par l’atelier Roussel, menuisier à Angers · <time datetime="2026-10-14">14 octobre 2026</time> · 4 min de lecture</p>
</header>
<nav class="nsap-nav" aria-label="Sommaire de l’article" data-nsap-nav>
<p class="nsap-navtitle">Sommaire</p>
<div class="nsap-status">
<span class="nsap-left" data-nsap-left>4 min de lecture</span>(() => {
if (!document.querySelector(".nsap")) return;
document.querySelectorAll("[data-nsap]").forEach((root) => {
const on = (el, type, fn) => el.addEventListener(type, fn);
const offs = [];
const nav = root.querySelector("[data-nsap-nav]");
const details = root.querySelector("[data-nsap-details]");
const summary = details.querySelector("summary");
const list = root.querySelector("[data-nsap-list]");
const body = root.querySelector("[data-nsap-body]");
const left = root.querySelector("[data-nsap-left]");
const now = root.querySelector("[data-nsap-now]");:root {
--nsap-text: #1f2421;
--nsap-muted: #56605a;
--nsap-panel: #ffffff;
--nsap-line: #c9cfc8;
--nsap-accent: #0f5c4d;
--nsap-soft: #dcefe9;
--nsap-on-accent: #ffffff;
--demo-navigation-sommaire-article-progression-bg: #f5f3ee;
--demo-navigation-sommaire-article-progression-text: #1f2421;
}
Free component: copy it freely, including for commercial projects.
Other breadcrumbs and pagination components in WordPress
Breadcrumbs and pagination components in WordPress
A bottom bar with Call, Directions and Free quote that tucks away while visitors read down the page and returns as soon as they scroll up. Built for tradespeople whose customers arrive on a phone.
- Tailwind
- React
- CSS
- WordPress

A slim bar at the top of the page with a message, a link and a close button; once closed, it stays hidden for the period you choose.
- Tailwind
- React
- CSS
- WordPress

A column of dots on the side of the page that follows the section being read and lets visitors jump to it, with a label on hover and focus.
- Tailwind
- React
- CSS
- WordPress

Step indicator
FreeAn order step indicator: finished steps clickable to go back, the current step announced, upcoming steps locked.
- Tailwind
- React
- CSS
- WordPress

Tooltips in four positions that open on hover, tap and keyboard focus, and close with Escape, as WCAG requires.
- Tailwind
- React
- CSS
- WordPress

Quick access links that appear on the first Tab press to skip the header and menu, as required by the RGAA and WCAG.
- Tailwind
- React
- CSS
- WordPress