Falling words in WordPress
The words of a slogan drop one by one into the heading and bounce on landing, for a cheerful tagline in pure CSS.
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, Mots qui tombent
* Description: Les mots d’un slogan tombent un à un dans le titre et rebondissent à l’arrivée, pour une accroche joyeuse en CSS pur. Ajoute la composition « Mots qui tombent » à 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-mots-qui-tombent
*<!-- wp:group {"tagName": "section", "className": "efmt", "layout": {"type": "default"}} -->
<section class="wp-block-group efmt"><!-- wp:paragraph {"className": "efmt-eyebrow"} -->
<p class="efmt-eyebrow">Le Camion Jaune · food truck à Nantes</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "efmt-title", "anchor": "efmt-titre"} -->
<h2 class="wp-block-heading efmt-title" id="efmt-titre"><span class="efmt-word" style="--efmt-i: 0">Burgers</span> <span class="efmt-word" style="--efmt-i: 1">fermiers,</span> <span class="efmt-word" style="--efmt-i: 2">frites</span> <span class="efmt-word" style="--efmt-i: 3">maison</span> <span class="efmt-word" style="--efmt-i: 4">et</span> <span class="efmt-word" style="--efmt-i: 5">bonne</span> <span class="efmt-word" style="--efmt-i: 6">humeur.</span></h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "efmt-text"} -->
<p class="efmt-text">Du mardi au samedi, de 11 h 30 à 14 h, quai de la Fosse. Viande d’éleveurs de Loire-Atlantique, pain de la boulangerie d’à côté.</p>
<!-- /wp:paragraph -->
<!-- wp:html -->
<a class="efmt-link" href="#efmt-carte">Voir la carte et les emplacements</a>:root {
--efmt-bg: #fde047;
--efmt-text: #1c1917;
--efmt-muted: #44403c;
--efmt-accent: #1c1917;
--efmt-accent-text: #fde047;
--demo-effet-mots-qui-tombent-bg: #fef9c3;
--demo-effet-mots-qui-tombent-text: #1c1917;
}
@media (prefers-color-scheme: dark) {
:root.forge-follows-system:not([data-theme="light"]) {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