Skip to content

Holographic hover card in WordPress

A card that lifts on hover while an iridescent shine sweeps diagonally across it, like a holographic card.

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-carte-reflet-survol.php
<?php
/**
 * Plugin Name: Forge, Carte à reflet holographique
 * Description: Une carte qui se soulève au survol pendant qu’un reflet irisé la traverse en diagonale, comme une carte holographique. Ajoute la composition « Carte à reflet holographique » à 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-carte-reflet-survol
 *
pattern.html
<!-- wp:group {"tagName": "article", "className": "efch", "layout": {"type": "default"}} -->
<article class="wp-block-group efch"><!-- wp:html -->
<span class="efch__shine" aria-hidden="true"></span>
<!-- /wp:html -->
<!-- wp:paragraph {"className": "efch__eyebrow"} -->
<p class="efch__eyebrow">Club Atelier · Carte membre</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "efch__title", "anchor": "efch-titre"} -->
<h2 class="wp-block-heading efch__title" id="efch-titre">−10 % toute l’année</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "efch__text"} -->
<p class="efch__text">Ateliers prioritaires, invitations aux ventes privées et une bougie offerte à votre anniversaire. Adhésion gratuite en boutique.</p>
style.css
:root {
  --efch-card: linear-gradient(135deg, #312e81, #4c1d95 55%, #831843);
  --efch-shadow: rgb(49 46 129 / 0.45);
  --efch-accent: #ffffff;
  --efch-on-accent: #312e81;
  --demo-effet-carte-reflet-survol-bg: #f5f3ff;
  --demo-effet-carte-reflet-survol-text: #1e1b4b;
}

@media (prefers-color-scheme: dark) {
  :root.forge-follows-system:not([data-theme="light"]) {
    --efch-card: linear-gradient(135deg, #1e1b4b, #2e1065 55%, #500724);

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