Marketing · Gutenberg
Comparison Cards block for WordPress
Visual side-by-side product or plan comparison cards with features, pricing, and CTA. Distinct from the tabular Comparison Table block.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
Visual side-by-side product or plan comparison cards with features, pricing, and CTA. Distinct from the tabular Comparison Table block.
Inspector panels on this block: Cards, Header, Appearance. Those titles come from index.js, not from a shared template.
Behavior controls: “Type” options: ✓ Check, ✗ Cross, — Dash.
Where to find it
Gutenberg inserter → Marketing → search “Comparison Cards” (block name `blockenberg/comparison-cards` in block.json). Style it in the sidebar after insert.
How to use Comparison Cards block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Comparison Cards”, insert it. Category: Marketing.
- Configure inspector controls that exist on this block. Open Cards. Set “Plan title”, “Subtitle”, “Price”, “Period (e.g. mo / yr)”.
- Check the published page. The view script reads HTML data attributes: data-currency, data-initialized, data-items, data-show-vs. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Plan title | Text field in the inspector. |
| Subtitle | Text field in the inspector. |
| Price | Text field in the inspector. |
| Period (e.g. mo / yr) | Text field in the inspector. |
| Badge text | Text field in the inspector. |
| CTA label | Text field in the inspector. |
| CTA URL | Text field in the inspector. |
| Highlighted (featured card) | On/off toggle in the inspector. |
| CTA opens in new tab | On/off toggle in the inspector. |
| Cards — Text | Text field in the inspector. |
| Type | Select control; the chosen value is saved on the block. Options: ✓ Check; ✗ Cross; — Dash. |
| Show section title | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Show subtitle | On/off toggle in the inspector. On by default. Saved as `showSubtitle`. |
| Show "vs" badges | On/off toggle in the inspector. On by default. Saved as `showVsBadge`. |
| Currency symbol | Text field in the inspector. block.json default: $. Saved as `currency`. |
| Card radius (px) | Numeric range control in the inspector. Range 0–32. block.json default: 16. Saved as `cardRadius`. |
| CTA radius (px) | Numeric range control in the inspector. Range 0–32. block.json default: 8. Saved as `ctaRadius`. |
| Gap (px) | Numeric range control in the inspector. Range 0–60. block.json default: 20. Saved as `gap`. |
| Card title size (px) | Numeric range control in the inspector. Range 14–36. block.json default: 22. Saved as `cardTitleSize`. |
| Price size (px) | Numeric range control in the inspector. Range 24–72. block.json default: 44. Saved as `priceSize`. |
| Padding top | Numeric range control in the inspector. Range 0–200. block.json default: 64. Saved as `paddingTop`. |
| Padding bottom | Numeric range control in the inspector. Range 0–200. block.json default: 64. Saved as `paddingBottom`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-currency, data-initialized, data-items, data-show-vs.
- An IntersectionObserver starts work when the block enters the viewport.
When this is the right block
- Visual side-by-side product or plan comparison cards with features, pricing, and CTA. Distinct from the tabular Comparison Table block — that is the job of Comparison Cards, not a generic content block.
- Use it when you need the editor control labeled “Plan title”, which exists on this block’s inspector.
- It matches pages about comparison, cards, versus.
- Inserter grouping: landing pages, campaign sections, and conversion layouts.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Comparison Cards block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Comparison Cards”. It sits under Marketing. After insert, open Cards and set “Plan title”, “Subtitle”, “Price”, “Period (e.g. mo / yr)”.
What makes Comparison Cards different from other Blockenberg blocks?
Visual side-by-side product or plan comparison cards with features, pricing, and CTA. Distinct from the tabular Comparison Table block. Inspector labels on this block include “Plan title”, “Subtitle”, “Price”, “Period (e.g. mo / yr)”.
Is the Comparison Cards Gutenberg block free?
Yes. Comparison Cards ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Comparison Cards to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Cards, Header, Appearance).
Related marketing blocks
Comparison Checklist
Two-column 'With / Without' checklist comparison to highlight the value of your product or service.
Comparison Guide
A structured X vs Y comparison guide with criteria scoring, winner badges, and a verdict. Perfect for product, software, and strategy comparisons.
Comparison Section
Us vs. Them comparison table with feature rows, checkmark/cross icons, highlighted winner column, and full colour/typography controls.
Comparison Wall
Side-by-side feature comparison with two columns — ideal for before/after, free vs pro, etc.
Icon Feature Grid
Responsive grid of features with icons, titles and descriptions. Perfect for product pages, landing pages, and about sections.
Pricing Section
All-in-one multi-tier pricing section with monthly/yearly toggle, feature rows, popular badge, and per-plan CTAs.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Comparison Cards from the Gutenberg inserter.