Skip to content

Glowing hover button in WordPress

A call-to-action button wrapped in a breathing glow that brightens and gets swept by a shine on hover.

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-bouton-lueur-survol.php
<?php
/**
 * Plugin Name: Forge, Bouton à lueur au survol
 * Description: Un bouton d’appel à l’action entouré d’un halo qui respire, s’intensifie et se fait traverser d’un reflet au survol. Ajoute la composition « Bouton à lueur au survol » à 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-bouton-lueur-survol
 *
pattern.html
<!-- wp:group {"className": "efbt", "layout": {"type": "default"}} -->
<div class="wp-block-group efbt"><!-- wp:heading {"level": 2, "className": "efbt__title"} -->
<h2 class="wp-block-heading efbt__title">Un projet de rénovation ?</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "efbt__text"} -->
<p class="efbt__text">Décrivez vos travaux en quelques lignes : un artisan de l’équipe vous rappelle sous 48 h avec un devis détaillé et gratuit.</p>
<!-- /wp:paragraph -->
<!-- wp:group {"className": "efbt__actions", "layout": {"type": "default"}} -->
<div class="wp-block-group efbt__actions"><!-- wp:html -->
<a class="efbt__btn" href="#efbt-devis"><span class="efbt__shine" aria-hidden="true"></span>Demander mon devis gratuit</a>
<!-- /wp:html -->
<!-- wp:html -->
style.css
:root {
  --efbt-text: #1c1917;
  --efbt-body: #57534e;
  --efbt-btn: #c2410c;
  --efbt-btn-hover: #9a3412;
  --efbt-on-btn: #ffffff;
  --efbt-glow: linear-gradient(90deg, #fb923c, #f43f5e, #f59e0b);
  --efbt-link: #9a3412;
  --demo-effet-bouton-lueur-survol-bg: #fffaf5;
  --demo-effet-bouton-lueur-survol-text: #1c1917;
}

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