Skip to content

Staggered reveal without a delay variable in WordPress

A grid of cards that rise in one after another thanks to sibling-index() and sibling-count(), with no --i in the HTML, a Firefox fallback and reduced motion respected.

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-apparition-echelonnee-sibling-index.php
<?php
/**
 * Plugin Name: Forge, Apparition en cascade sans variable de délai
 * Description: Une grille de cartes qui apparaissent l’une après l’autre grâce à sibling-index() et sibling-count(), sans --i dans le HTML, avec repli pour Firefox et mouvement réduit respecté. Ajoute la composition « Apparition en cascade sans variable de délai » à 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-apparition-echelonnee-sibling-index
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "eaes", "layout": {"type": "default"}} -->
<section class="wp-block-group eaes"><!-- wp:paragraph {"className": "eaes-eyebrow"} -->
<p class="eaes-eyebrow">Cabinet Morel · expert-comptable à Lyon</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "eaes-title", "anchor": "eaes-titre"} -->
<h2 class="wp-block-heading eaes-title" id="eaes-titre">Tout ce qu’il faut pour tenir vos comptes sereinement</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "eaes-intro"} -->
<p class="eaes-intro">Six missions à la carte pour les artisans, commerçants et professions libérales, avec un devis fixe avant de commencer.</p>
<!-- /wp:paragraph -->
<!-- wp:html -->
<ul class="eaes-list" role="list">
style.css
:root {
  --eaes-bg: #f6f7fb;
  --eaes-card: #ffffff;
  --eaes-line: #d9deea;
  --eaes-text: #14213d;
  --eaes-body: #4a5468;
  --eaes-accent: #1d4ed8;
  --eaes-accent-text: #ffffff;
  --demo-effet-apparition-echelonnee-sibling-index-bg: #e9ecf4;
  --demo-effet-apparition-echelonnee-sibling-index-text: #14213d;
}

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