Marketing · Gutenberg

Comparison Section block for WordPress

Us vs. Them comparison table with feature rows, checkmark/cross icons, highlighted winner column, and full colour/typography controls.

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.

Get Blockenberg

What it actually does

Us vs. Them comparison table with feature rows, checkmark/cross icons, highlighted winner column, and full colour/typography controls.

Inspector panels on this block: Heading, Columns, Feature Rows, CTA, Layout. Those titles come from index.js, not from a shared template.

Behavior controls: “Highlight Column” options: Col 1 (You), Col 2 (Others), None.

Where to find it

Gutenberg inserter → Marketing → search “Comparison Section” (block name `blockenberg/comparison-section` in block.json). Style it in the sidebar after insert.

How to use Comparison Section block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Comparison Section”, insert it. Category: Marketing.
  3. Configure inspector controls that exist on this block. Open Heading. Set “Show Heading”, “Col 1 Label (You)”, “Col 2 Label (Others)”, “Show Icons”.
  4. Check the published page. The view script reads HTML data attributes: data-opts. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Show HeadingOn/off toggle in the inspector. On by default. Saved as `showHeading`.
Col 1 Label (You)Text field in the inspector. block.json default: Us. Saved as `col1Label`.
Col 2 Label (Others)Text field in the inspector. block.json default: Others. Saved as `col2Label`.
Show IconsOn/off toggle in the inspector. On by default. Saved as `showColIcons`.
Highlight ColumnSelect control; the chosen value is saved on the block. Options: Col 1 (You); Col 2 (Others); None. block.json default: col1. Saved as `highlightCol`.
FeatureText field in the inspector.
Show CTAOn/off toggle in the inspector. On by default. Saved as `showCta`.
CTA LabelText field in the inspector. block.json default: Get Started Free. Saved as `ctaLabel`.
CTA URLText field in the inspector. block.json default: #. Saved as `ctaUrl`.
Table Max Width (px)Text field in the inspector. block.json default: 720. Saved as `tableWidth`.
Padding Top (px)Numeric range control in the inspector. Range 0–200. block.json default: 80. Saved as `paddingTop`.
Padding Bottom (px)Numeric range control in the inspector. Range 0–200. block.json default: 80. Saved as `paddingBottom`.
Outer Max Width (px)Numeric range control in the inspector. Range 600–1600. block.json default: 1200. Saved as `maxWidth`.
Colors — BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `bgColor`.
Highlight Column BGColor control in the inspector. block.json default: #7c3aed. Saved as `highlightBg`.
Highlight Column TextColor control in the inspector. block.json default: #ffffff. Saved as `highlightColor`.
HeadingColor control in the inspector. block.json default: #111827. Saved as `headingColor`.
SubtextColor control in the inspector. block.json default: #6b7280. Saved as `textColor`.
Feature TextColor control in the inspector. block.json default: #374151. Saved as `featureColor`.
Yes / checkmarkColor control in the inspector. block.json default: #16a34a. Saved as `yesColor`.
No / crossColor control in the inspector. block.json default: #dc2626. Saved as `noColor`.
PartialColor control in the inspector. block.json default: #d97706. Saved as `partialColor`.
Table BorderColor control in the inspector. block.json default: #e5e7eb. Saved as `borderColor`.
CTA BackgroundColor control in the inspector. block.json default: #7c3aed. Saved as `ctaBg`.
CTA TextColor control in the inspector. block.json default: #ffffff. Saved as `ctaColor`.

What the front-end script actually does

When this is the right block

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 Section block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Comparison Section”. It sits under Marketing. After insert, open Heading and set “Show Heading”, “Col 1 Label (You)”, “Col 2 Label (Others)”, “Show Icons”.

What makes Comparison Section different from other Blockenberg blocks?

Us vs. Them comparison table with feature rows, checkmark/cross icons, highlighted winner column, and full colour/typography controls. Inspector labels on this block include “Show Heading”, “Col 1 Label (You)”, “Col 2 Label (Others)”, “Show Icons”.

Is the Comparison Section Gutenberg block free?

Yes. Comparison Section ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Comparison Section 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: Heading, Columns, Feature Rows, CTA).

Related marketing blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Comparison Section from the Gutenberg inserter.

Get Blockenberg