Skip to content

Brutalist sharp-edged cards in WordPress

Three brutalist service cards: one-pixel border, hard offset shadow that lifts on hover and sinks on click, large type, accent and dark variants. No JavaScript.

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

cartes-brutalistes-bordure-nette.php
<?php
/**
 * Plugin Name: Forge, Cartes brutalistes à bordure nette
 * Description: Trois cartes de service au style brutaliste : bordure d'un pixel, ombre dure décalée qui se soulève au survol et s'enfonce au clic, typographie large, variantes accent et sombre. Sans JavaScript. Ajoute la composition « Cartes brutalistes à bordure nette » à 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-cartes-brutalistes-bordure-nette
 *
pattern.html
<!-- wp:html -->
<section class="cbn" aria-labelledby="cbn-titre" data-cbn>
        <header class="cbn__head">
          <h2 class="cbn__title" id="cbn-titre">Trois façons d'imprimer chez nous</h2>
          <p class="cbn__intro">Atelier Encre Grasse, Lyon 7e. Petites séries, papiers choisis, et des fichiers vérifiés par une vraie personne avant chaque tirage.</p>
        </header>
        <ul class="cbn__list">
        <li class="cbn-card cbn-card--default" data-cbn-card data-cbn-variant="default">
          <p class="cbn-card__num" aria-hidden="true">01</p>
          <p class="cbn-card__tag">Riso · 2 couleurs</p>
          <h3 class="cbn-card__title">Affiches en risographie</h3>
          <p class="cbn-card__text">Format A3 sur papier recyclé 120 g, de 50 à 500 exemplaires. Grain visible, couleurs franches et encres à base de soja.</p>
style.css
:root {
  --cbn-offset: 8px;
  --cbn-border: 1px;
  --cbn-font: "Helvetica Neue", Arial, system-ui, sans-serif;
  --cbn-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --cbn-text: #111111;
  --cbn-muted: #3d3d3d;
  --cbn-card-bg: #ffffff;
  --cbn-card-text: #111111;
  --cbn-card-muted: #3d3d3d;
  --cbn-card-line: #111111;
  --cbn-card-shadow: #111111;

Free component: copy it freely, including for commercial projects.

Cards components in WordPress
  • A single-plan pricing card: struck-through price and discount, a places-left gauge driven by a data attribute, the list of everything included and a booking button that turns into a waiting list once sold out.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Three treatment cards in accessible neumorphism: gently raised surfaces, buttons that sink in when activated, a light/dark switch for the block itself. 3:1 outlines and AA text kept.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Four fully clickable workshop cards in a neo-brutalist style: thick border, solid offset shadow and a card that sinks onto its shadow on hover or focus. Pastel tones, dark mode, no JavaScript.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A mobile page to link from your social profiles: portrait, name, priority links (booking, WhatsApp, website, reviews, call), opening hours with an open or closed status, social links and a share button, in dependency-free HTML and CSS.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A seasonal promotion card with a struck-through price and discount that announces by itself whether the offer is coming, how many days are left or that it is over.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A 24-door Advent calendar where each surprise only opens from its day in December, with opened doors remembered.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component