Skip to content

Retro perspective grid in WordPress

An eighties announcement banner with a striped sun and a neon grid rolling towards the horizon.

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-grille-perspective-retro.php
<?php
/**
 * Plugin Name: Forge, Grille rétro en perspective
 * Description: Un bandeau d’annonce années 80 avec un soleil rayé et une grille néon qui défile vers l’horizon. Ajoute la composition « Grille rétro en perspective » à 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-grille-perspective-retro
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "efgr", "layout": {"type": "default"}} -->
<section class="wp-block-group efgr"><!-- wp:group {"className": "efgr__copy", "layout": {"type": "default"}} -->
<div class="wp-block-group efgr__copy"><!-- wp:paragraph {"className": "efgr__eyebrow"} -->
<p class="efgr__eyebrow">L’Arcade · bar à jeux · Nantes</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "efgr__title", "anchor": "efgr-titre"} -->
<h2 class="wp-block-heading efgr__title" id="efgr-titre">Soirée rétro tous les vendredis</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "efgr__text"} -->
<p class="efgr__text">Bornes d’arcade des années 80, tournoi de Pac-Man à 21 h et cocktails jusqu’à 2 h. Entrée libre, consoles en accès gratuit.</p>
<!-- /wp:paragraph -->
<!-- wp:html -->
style.css
:root {
  --efgr-sky-top: #fdf2f8;
  --efgr-sky-bottom: #fbcfe8;
  --efgr-line: rgb(190 24 93 / 0.55);
  --efgr-text: #500724;
  --efgr-body: #831843;
  --efgr-accent: #be185d;
  --efgr-on-accent: #ffffff;
  --efgr-sun-top: #f59e0b;
  --efgr-sun-bottom: #db2777;
  --demo-effet-grille-perspective-retro-bg: #fff7fb;
  --demo-effet-grille-perspective-retro-text: #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