Skip to content

Outlined heading that fills in in WordPress

A large heading in hollow letters where each word fills with colour from left to right, one after another.

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

Open in a new tab

The code in WordPress

effet-texte-contour-remplissage.php
<?php
/**
 * Plugin Name: Forge, Titre en contour qui se remplit
 * Description: Un grand titre en lettres creuses dont chaque mot se remplit de couleur de gauche à droite, l’un après l’autre. Ajoute la composition « Titre en contour qui se remplit » à 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-contour-remplissage
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "eftc", "layout": {"type": "default"}} -->
<section class="wp-block-group eftc"><!-- wp:paragraph {"className": "eftc__eyebrow"} -->
<p class="eftc__eyebrow">Le Hangar · Lille · saison 2026-2027</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "eftc__title", "anchor": "eftc-titre"} -->
<h2 class="wp-block-heading eftc__title" id="eftc-titre"><span class="eftc__word eftc__word--1">Danse</span> <span class="eftc__word eftc__word--2">Cirque</span> <span class="eftc__word eftc__word--3">Concerts</span></h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "eftc__text"} -->
<p class="eftc__text">Quarante spectacles de septembre à juin, dans une ancienne halle de la gare Saint-Sauveur, avec des places dès 8 €.</p>
<!-- /wp:paragraph -->
<!-- wp:html -->
<a class="eftc__link" href="#eftc-programmation">Découvrir la programmation</a>
style.css
:root {
  --eftc-bg: #fff1f2;
  --eftc-ink: #be123c;
  --eftc-text: #4c0519;
  --eftc-body: #881337;
  --eftc-on-ink: #ffffff;
  --demo-effet-texte-contour-remplissage-bg: #fff8f8;
  --demo-effet-texte-contour-remplissage-text: #4c0519;
}

@media (prefers-color-scheme: dark) {
  :root.forge-follows-system:not([data-theme="light"]) {

Free component: copy it freely, including for commercial projects.

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
    Component
  • 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
    Component
  • 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
    Component
  • 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
    Component
  • Four offset, translucent sine waves gently roll along the bottom of a section, each at its own pace.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component