Blog · Gutenberg

Pros & Cons block for WordPress

A two-column pros and cons comparison block for reviews and articles. Supports editable items, custom icons, heading, and full color control for each column.

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

A two-column pros and cons comparison block for reviews and articles. Supports editable items, custom icons, heading, and full color control for each column.

Inspector panels on this block: Content, Layout, Pros Colors, Cons Colors, General Colors, Sizing. Those titles come from index.js, not from a shared template.

Behavior controls: “Layout” options: Two Columns (side by side), Stacked (pros then cons).

Where to find it

Gutenberg inserter → Blog → search “Pros & Cons” (block name `blockenberg/pros-cons` in block.json). Style it in the sidebar after insert.

How to use Pros & Cons block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Pros & Cons”, insert it. Category: Blog.
  3. Configure inspector controls that exist on this block. Open Content. Set “Show Block Heading”, “Heading”, “Pros Column Heading”, “Cons Column Heading”.
  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 Block HeadingOn/off toggle in the inspector. On by default. Saved as `showHeading`.
HeadingText field in the inspector. block.json default: Pros & Cons. Saved as `heading`.
Pros Column HeadingText field in the inspector. block.json default: Pros. Saved as `prosHeading`.
Cons Column HeadingText field in the inspector. block.json default: Cons. Saved as `consHeading`.
Show IconsOn/off toggle in the inspector. On by default. Saved as `showIcons`.
LayoutSelect control; the chosen value is saved on the block. Options: Two Columns (side by side); Stacked (pros then cons). block.json default: two-col. Saved as `layout`.
Column Gap (px)Numeric range control in the inspector. Range 0–60. block.json default: 16. Saved as `columnGap`.
Heading (Heading Typo)Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `headingTypo`.
Column HeadingShared Blockenberg typography popover (family, size, weight, spacing). Saved as `colHeadTypo`.
Item TextShared Blockenberg typography popover (family, size, weight, spacing). Saved as `itemTypo`.
Header BackgroundColor control in the inspector. block.json default: #dcfce7. Saved as `prosHeadBg`.
Header Text ColorColor control in the inspector. block.json default: #15803d. Saved as `prosHeadColor`.
Column BackgroundColor control in the inspector. block.json default: #f0fdf4. Saved as `prosBg`.
Border ColorColor control in the inspector. block.json default: #bbf7d0. Saved as `prosBorder`.
Bullet ColorColor control in the inspector. block.json default: #16a34a. Saved as `prosBulletColor`.
Item Text ColorColor control in the inspector. block.json default: #166534. Saved as `prosItemColor`.
Header BackgroundColor control in the inspector. block.json default: #fee2e2. Saved as `consHeadBg`.
Header Text ColorColor control in the inspector. block.json default: #b91c1c. Saved as `consHeadColor`.
Column BackgroundColor control in the inspector. block.json default: #fef2f2. Saved as `consBg`.
Border ColorColor control in the inspector. block.json default: #fecaca. Saved as `consBorder`.
Bullet ColorColor control in the inspector. block.json default: #dc2626. Saved as `consBulletColor`.
Item Text ColorColor control in the inspector. block.json default: #991b1b. Saved as `consItemColor`.
Heading ColorColor control in the inspector. block.json default: #1e1b4b. Saved as `headingColor`.
Block BackgroundColor control in the inspector. Saved as `cardBg`.
Item Gap (px)Numeric range control in the inspector. Range 4–32. block.json default: 12. Saved as `itemGap`.
Column Radius (px)Numeric range control in the inspector. Range 0–32. block.json default: 12. Saved as `colRadius`.
Padding Vertical (px)Numeric range control in the inspector. Range 0–80. block.json default: 0. Saved as `paddingV`.
Padding Horizontal (px)Numeric range control in the inspector. Range 0–80. block.json default: 0. Saved as `paddingH`.
Max Width (px)Numeric range control in the inspector. Range 320–1400. block.json default: 860. Saved as `maxWidth`.

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 Pros & Cons block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Pros & Cons”. It sits under Blog. After insert, open Content and set “Show Block Heading”, “Heading”, “Pros Column Heading”, “Cons Column Heading”.

What makes Pros & Cons different from other Blockenberg blocks?

A two-column pros and cons comparison block for reviews and articles. Supports editable items, custom icons, heading, and full color control for each column. Inspector labels on this block include “Show Block Heading”, “Heading”, “Pros Column Heading”, “Cons Column Heading”.

Is the Pros & Cons Gutenberg block free?

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

Can I style Pros & Cons 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: Content, Layout, Pros Colors, Cons Colors).

Related blog blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Pros & Cons from the Gutenberg inserter.

Get Blockenberg