Skip to content

“Live” badge in WordPress

A show card with a “Live” badge whose white dot sends out a continuously spreading ripple.

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-badge-en-direct.php
<?php
/**
 * Plugin Name: Forge, Badge « en direct »
 * Description: Une carte d’émission avec un badge « En direct » dont le point blanc émet une onde qui se propage en continu. Ajoute la composition « Badge « en direct » » à 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-badge-en-direct
 *
pattern.html
<!-- wp:group {"tagName": "article", "className": "efld", "layout": {"type": "default"}} -->
<article class="wp-block-group efld"><!-- wp:paragraph {"className": "efld__badge"} -->
<p class="efld__badge"><span class="efld__dot" aria-hidden="true"><span class="efld__ping"></span></span>En direct</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"className": "efld__eyebrow"} -->
<p class="efld__eyebrow">Radio Bocage · 98.4 FM</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "efld__title", "anchor": "efld-titre"} -->
<h2 class="wp-block-heading efld__title" id="efld-titre">La matinale de Clémence</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "efld__text"} -->
<p class="efld__text">Infos locales, météo des marées et invités du jour, de 7 h à 9 h, depuis notre studio de Granville.</p>
style.css
:root {
  --efld-card: #ffffff;
  --efld-border: #e2e8f0;
  --efld-text: #0f172a;
  --efld-body: #475569;
  --efld-live: #b91c1c;
  --efld-on-live: #ffffff;
  --efld-accent: #0f172a;
  --efld-on-accent: #ffffff;
  --efld-focus: #b91c1c;
  --demo-effet-badge-en-direct-bg: #f1f5f9;
  --demo-effet-badge-en-direct-text: #0f172a;

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