Shining promo ribbon in WordPress
A product card crossed at the corner by a discount ribbon over which a glint of light sweeps.
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, Ruban promo qui brille
* Description: Une fiche produit barrée en coin d’un ruban de réduction sur lequel passe un reflet lumineux. Ajoute la composition « Ruban promo qui brille » à 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-ruban-promo-brillant
*<!-- wp:group {"tagName": "article", "className": "efrb", "layout": {"type": "default"}} -->
<article class="wp-block-group efrb"><!-- wp:paragraph {"className": "efrb__ribbon"} -->
<p class="efrb__ribbon"><span class="efrb__shine" aria-hidden="true"></span><span class="efrb__label">−20 %</span></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"className": "efrb__eyebrow"} -->
<p class="efrb__eyebrow">Fromagerie Bouvier · Annecy</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "efrb__title", "anchor": "efrb-titre"} -->
<h2 class="wp-block-heading efrb__title" id="efrb-titre">Plateau découverte des Alpes</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "efrb__text"} -->
<p class="efrb__text">Reblochon, tomme, beaufort d’alpage, abondance et bleu de Termignon, avec leur fiche d’accord mets-vins.</p>:root {
--efrb-card: #fffbeb;
--efrb-border: #fde68a;
--efrb-text: #1c1917;
--efrb-body: #57534e;
--efrb-ribbon: #b91c1c;
--efrb-on-ribbon: #ffffff;
--efrb-accent: #1c1917;
--efrb-on-accent: #ffffff;
--efrb-focus: #b91c1c;
--demo-effet-ruban-promo-brillant-bg: #fefce8;
--demo-effet-ruban-promo-brillant-text: #1c1917;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