Mesh gradient background in WordPress
A hero set on a pastel mesh gradient whose colour patches slowly glide.
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, Fond en dégradé maillé
* Description: Une accroche posée sur un dégradé maillé pastel dont les taches de couleur glissent lentement. Ajoute la composition « Fond en dégradé maillé » à 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-degrade-maille
*<!-- wp:group {"tagName": "section", "className": "efdm", "layout": {"type": "default"}} -->
<section class="wp-block-group efdm"><!-- wp:paragraph {"className": "efdm__eyebrow"} -->
<p class="efdm__eyebrow">Cabinet Équilibre · Sophrologie et yoga</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "efdm__title", "anchor": "efdm-titre"} -->
<h2 class="wp-block-heading efdm__title" id="efdm-titre">Prenez une heure pour vous</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "efdm__text"} -->
<p class="efdm__text">Séances individuelles et cours collectifs en petits groupes, au cœur de Bordeaux et en visio. Première séance découverte offerte.</p>
<!-- /wp:paragraph -->
<!-- wp:group {"className": "efdm__actions", "layout": {"type": "default"}} -->
<div class="wp-block-group efdm__actions"><!-- wp:html -->:root {
--efdm-mesh: radial-gradient(at 20% 25%, #fbcfe8 0, transparent 50%), radial-gradient(at 80% 20%, #bfdbfe 0, transparent 50%), radial-gradient(at 75% 80%, #fde68a 0, transparent 50%), radial-gradient(at 20% 80%, #bbf7d0 0, transparent 50%);
--efdm-base: #fff7ed;
--efdm-text: #1f1a17;
--efdm-body: #44403c;
--efdm-accent: #1f1a17;
--efdm-on-accent: #ffffff;
--demo-effet-degrade-maille-bg: #fffbf5;
--demo-effet-degrade-maille-text: #1f1a17;
}
@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
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.
- Tailwind
- React
- CSS
- 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