Skip to content

Free versus paid comparison in WordPress

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.

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-comparatif-gratuit-payant.php
<?php
/**
 * Plugin Name: Forge, Comparatif gratuit contre payant
 * Description: Un tableau à deux offres : lignes cochées, colonne mise en avant de bout en bout et un bouton d'action par offre. Tout en HTML et CSS, sans aucun script. Ajoute la composition « Comparatif gratuit contre payant » à 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-comparatif-gratuit-payant
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "fcg", "layout": {"type": "default"}} -->
<section class="wp-block-group fcg"><!-- wp:group {"tagName": "header", "className": "fcg__head", "layout": {"type": "default"}} -->
<header class="wp-block-group fcg__head"><!-- wp:paragraph {"className": "fcg__kicker"} -->
<p class="fcg__kicker">Deux offres, sans engagement</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "fcg__title", "anchor": "fcg-titre"} -->
<h2 class="wp-block-heading fcg__title" id="fcg-titre">Commencez gratuitement, passez à la suite quand votre activité grandit</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "fcg__intro"} -->
<p class="fcg__intro">L'offre Découverte suffit pour être trouvé en ligne. L'offre Complète ajoute votre adresse, vos statistiques et une vraie assistance.</p>
<!-- /wp:paragraph --></header>
<!-- /wp:group -->
style.css
:root {
  --fcg-paper: #ffffff;
  --fcg-text: #172a28;
  --fcg-muted: #4b5f5c;
  --fcg-line: #d9e3e1;
  --fcg-accent: #0f766e;
  --fcg-on: #ffffff;
  --fcg-hover: #0b5f58;
  --fcg-tint: #eefaf7;
  --fcg-off: #6b7c79;
  --fcg-badge-bg: #ffffff;
  --fcg-badge: #0f5d57;

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 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
  • A simulator that estimates the heating bill and the yearly savings in euros from the floor area, current energy and chosen works.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component