Falling snowflakes in WordPress
Snowflakes drifting down behind a winter banner, in pure CSS, with a button to pause the snow.
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, Flocons de neige qui tombent
* Description: Des flocons de neige qui tombent en dérivant derrière un bandeau d’hiver, en CSS pur, avec un bouton pour mettre la neige en pause. Ajoute la composition « Flocons de neige 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-flocons-neige-tombants
*<!-- wp:html -->
<section class="efn" data-efn aria-labelledby="efn-titre">
<div class="efn-sky" aria-hidden="true">
<span class="efn-flake" style="left: 0.5%; top: -10%; width: 0.25rem; height: 0.25rem; opacity: 0.55; --efn-d: 7s; --efn-delay: -0.0s; --efn-drift: -4rem"></span>
<span class="efn-flake" style="left: 37.5%; top: 43%; width: 0.70rem; height: 0.70rem; opacity: 0.67; --efn-d: 10s; --efn-delay: -6.6s; --efn-drift: 3rem"></span>
<span class="efn-flake" style="left: 74.5%; top: 6%; width: 0.52rem; height: 0.52rem; opacity: 0.79; --efn-d: 7s; --efn-delay: -5.4s; --efn-drift: 1rem"></span>
<span class="efn-flake" style="left: 11.5%; top: 59%; width: 0.34rem; height: 0.34rem; opacity: 0.91; --efn-d: 10s; --efn-delay: -4.2s; --efn-drift: -1rem"></span>
<span class="efn-flake" style="left: 48.5%; top: 22%; width: 0.79rem; height: 0.79rem; opacity: 0.55; --efn-d: 7s; --efn-delay: -3.0s; --efn-drift: -3rem"></span>
<span class="efn-flake" style="left: 85.5%; top: 75%; width: 0.61rem; height: 0.61rem; opacity: 0.67; --efn-d: 10s; --efn-delay: -1.8s; --efn-drift: 4rem"></span>
<span class="efn-flake" style="left: 22.5%; top: 38%; width: 0.43rem; height: 0.43rem; opacity: 0.79; --efn-d: 7s; --efn-delay: -0.6s; --efn-drift: 2rem"></span>
<span class="efn-flake" style="left: 59.5%; top: 1%; width: 0.25rem; height: 0.25rem; opacity: 0.91; --efn-d: 10s; --efn-delay: -7.2s; --efn-drift: 0rem"></span>
<span class="efn-flake" style="left: 96.5%; top: 54%; width: 0.70rem; height: 0.70rem; opacity: 0.55; --efn-d: 7s; --efn-delay: -6.0s; --efn-drift: -2rem"></span>(() => {
if (!document.querySelector(".efn")) return;
document.querySelectorAll("[data-efn]").forEach((root) => {
const on = (el, type, fn) => el.addEventListener(type, fn);
const toggle = root.querySelector("[data-efn-toggle]");
on(toggle, "click", () => {
const paused = toggle.getAttribute("aria-pressed") !== "true";
toggle.setAttribute("aria-pressed", String(paused));
if (paused) root.setAttribute("data-efn-paused", "");
else root.removeAttribute("data-efn-paused");
});
});:root {
--efn-bg: linear-gradient(180deg, #16304d, #244a6b);
--demo-effet-flocons-neige-tombants-bg: #e6edf3;
--demo-effet-flocons-neige-tombants-text: #16304d;
}
@media (prefers-color-scheme: dark) {
:root.forge-follows-system:not([data-theme="light"]) {
--efn-bg: linear-gradient(180deg, #0b1828, #142e47);
--demo-effet-flocons-neige-tombants-bg: #060b12;
--demo-effet-flocons-neige-tombants-text: #eef4fa;
}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