Scroll-inked heading with highlights (view-timeline) in WordPress
A large heading whose words turn from grey to ink as the page scrolls, then whose key phrases get a marker stroke, in pure CSS with a readable fallback.
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, Titre qui se colore au défilement (view-timeline)
* Description: Un grand titre dont les mots passent du gris à l’encre au fil du défilement, puis dont les mots clés reçoivent un coup de surligneur, en CSS pur avec repli lisible. Ajoute la composition « Titre qui se colore au défilement (view-timeline) » à 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-effet-texte-surligne-defilement-view-timeline
*<!-- wp:group {"tagName": "section", "className": "etsv etsv-card", "layout": {"type": "default"}} -->
<section class="wp-block-group etsv etsv-card"><!-- wp:paragraph {"className": "etsv-eyebrow"} -->
<p class="etsv-eyebrow">Toitures Le Goff · couvreur-zingueur à Nantes</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "etsv-heading", "anchor": "etsv-titre"} -->
<h2 class="wp-block-heading etsv-heading" id="etsv-titre"><span class="etsv-word" style="--etsv-i: 0">Depuis</span> <span class="etsv-word" style="--etsv-i: 1">1987,</span> <span class="etsv-word" style="--etsv-i: 2">nous</span> <span class="etsv-word" style="--etsv-i: 3">refaisons</span> <span class="etsv-word" style="--etsv-i: 4">les</span> <span class="etsv-word" style="--etsv-i: 5">toits</span> <span class="etsv-word" style="--etsv-i: 6">de</span> <span class="etsv-word" style="--etsv-i: 7">Nantes</span> <span class="etsv-word" style="--etsv-i: 8">en</span> <mark class="etsv-mark" style="--etsv-b: 10"><span class="etsv-word" style="--etsv-i: 9">ardoise</span> <span class="etsv-word" style="--etsv-i: 10">naturelle</span></mark><span class="etsv-word" style="--etsv-i: 10">,</span> <span class="etsv-word" style="--etsv-i: 11">avec</span> <span class="etsv-word" style="--etsv-i: 12">un</span> <mark class="etsv-mark" style="--etsv-b: 17"><span class="etsv-word" style="--etsv-i: 13">devis</span> <span class="etsv-word" style="--etsv-i: 14">détaillé</span> <span class="etsv-word" style="--etsv-i: 15">sous</span> <span class="etsv-word" style="--etsv-i: 16">48</span> <span class="etsv-word" style="--etsv-i: 17">heures</span></mark> <span class="etsv-word" style="--etsv-i: 18">et</span> <span class="etsv-word" style="--etsv-i: 19">une</span> <mark class="etsv-mark" style="--etsv-b: 21"><span class="etsv-word" style="--etsv-i: 20">garantie</span> <span class="etsv-word" style="--etsv-i: 21">décennale</span></mark> <span class="etsv-word" style="--etsv-i: 22">sur</span> <span class="etsv-word" style="--etsv-i: 23">chaque</span> <span class="etsv-word" style="--etsv-i: 24">chantier.</span></h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "etsv-text"} -->
<p class="etsv-text">Visite du toit, photos des points faibles et chiffrage poste par poste : vous savez ce que nous ferons avant que la première ardoise soit posée.</p>
<!-- /wp:paragraph -->
<!-- wp:html -->
<a class="etsv-link" href="#etsv-visite">Demander une visite du toit</a>:root {
--etsv-paper: #faf6ee;
--etsv-ink: #1c1814;
--etsv-dim: #655d52;
--etsv-mark: #fcd34d;
--etsv-accent: #9a3412;
--etsv-accent-text: #ffffff;
--demo-effet-texte-surligne-defilement-view-timeline-bg: #efe8da;
--demo-effet-texte-surligne-defilement-view-timeline-text: #1c1814;
}
@media (prefers-color-scheme: dark) {Free component: copy it freely, including for commercial projects.
Other visual effects components in WordPress
Visual effects components in WordPress
Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.
- Tailwind
- React
- CSS
- WordPress

A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.
- Tailwind
- React
- CSS
- WordPress

A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.
- Tailwind
- React
- CSS
- WordPress

A paragraph whose words turn from grey to full ink, one by one, as the page scrolls, in pure CSS with a plain-text fallback.
- Tailwind
- React
- CSS
- WordPress

Four offset, translucent sine waves gently roll along the bottom of a section, each at its own pace.
- Tailwind
- React
- CSS
- WordPress

A row of cards where the hovered card lights up with a halo that follows the mouse and brightens its edge closest to the pointer.
- Tailwind
- React
- CSS
- WordPress