Skip to content

Clickable service cards in WordPress

A grid of six fully clickable service cards: icon, title, description, duration or reimbursement, and an arrow that slides 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

features-cartes-liens.php
<?php
/**
 * Plugin Name: Forge, Cartes de services cliquables
 * Description: Une grille de six cartes de services entièrement cliquables : icône, titre, description, durée ou remboursement, et flèche qui glisse au survol. Ajoute la composition « Cartes de services cliquables » à 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-features-cartes-liens
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "flinks", "layout": {"type": "default"}} -->
<section class="wp-block-group flinks"><!-- wp:group {"className": "flinks__head", "layout": {"type": "default"}} -->
<div class="wp-block-group flinks__head"><!-- wp:group {"className": "flinks__intro", "layout": {"type": "default"}} -->
<div class="wp-block-group flinks__intro"><!-- wp:paragraph {"className": "flinks__eyebrow"} -->
<p class="flinks__eyebrow">Nos soins</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "flinks__title", "anchor": "flinks-title"} -->
<h2 class="wp-block-heading flinks__title" id="flinks-title">Six spécialités sous un même toit</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "flinks__lead"} -->
<p class="flinks__lead">Les praticiens de la maison de santé partagent votre dossier, avec votre accord, pour vous suivre sans tout réexpliquer.</p>
<!-- /wp:paragraph --></div>
style.css
:root {
  --flinks-text: #042f2e;
  --flinks-muted: #335d5a;
  --flinks-accent: #0f766e;
  --flinks-accent-text: #ffffff;
  --flinks-card: #ffffff;
  --flinks-line: #cdeae5;
  --flinks-tile: #ccfbf1;
  --flinks-tag: #f0fdfa;
  --flinks-tag-text: #115e59;
  --flinks-shadow: rgb(15 118 110 / 0.45);
  --demo-features-cartes-liens-bg: #f0fdfa;

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

Features components in WordPress
  • Three cards in saturated flat colours (yellow, pink, electric blue) with high-contrast text and a dark variant. Every colour pair is measured at AA: 5.5:1 at worst.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Six features as frosted glass cards over a slowly drifting aurora mesh gradient. Pause button, still background under prefers-reduced-motion, CSS and a light script.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • The key message stays pinned while the background changes colour and illustration at each scroll step. CSS sticky, a light script, stacked cards as fallback under prefers-reduced-motion.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A six-cell bento grid: key figures, SVG sparklines, a quote and icons. All the text is in the HTML and the animation is CSS only, with no script at all.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A two-offer table: checked rows, a column highlighted from top to bottom and one call-to-action button per offer. Pure HTML and CSS, no script at all.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A magazine-style article: title band, standfirst, drop cap, subheadings and a pull quote, set in three columns of equal height. Pure CSS, no script at all.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component