Blog · Gutenberg

Decision Matrix block for WordPress

Weighted criteria scoring matrix to compare options and surface the best decision with totals and a winner highlight.

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

Weighted criteria scoring matrix to compare options and surface the best decision with totals and a winner highlight.

Inspector panels on this block: Title, Options (, Criteria (, Display, Appearance. Those titles come from index.js, not from a shared template.

Where to find it

Gutenberg inserter → Blog → search “Decision Matrix” (block name `blockenberg/decision-matrix` in block.json). Style it in the sidebar after insert.

How to use Decision Matrix block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Decision Matrix”, insert it. Category: Blog.
  3. Configure inspector controls that exist on this block. Open Title. Set “Show Title”, “Title — Title”, “Show Subtitle”, “Subtitle”.
  4. Check the published page. The view script reads HTML data attributes: data-opts, data-rendered. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Show TitleOn/off toggle in the inspector. On by default. Saved as `showTitle`.
Title — TitleText field in the inspector. block.json default: Decision Matrix. Saved as `blockTitle`.
Show SubtitleOn/off toggle in the inspector. On by default. Saved as `showSubtitle`.
SubtitleText field in the inspector. block.json default: Scores are 1–10. Weighted totals determine the winner.. Saved as `blockSubtitle`.
NameText field in the inspector. Saved as `options`.
LabelText field in the inspector. Saved as `criteria`.
Weight (importance)Numeric range control in the inspector. Range 1–10. Saved as `criteria`.
Show Weights ColumnOn/off toggle in the inspector. On by default. Saved as `showWeights`.
Show Weighted ScoreOn/off toggle in the inspector. On by default. Saved as `showRawScores`.
Highlight WinnerOn/off toggle in the inspector. On by default. Saved as `showWinner`.
Winner Label Font SizeNumeric range control in the inspector. Range 10–24. block.json default: 15. Saved as `winnerFontSize`.
Border RadiusNumeric range control in the inspector. Range 0–20. block.json default: 10. Saved as `borderRadius`.
Block BackgroundColor control in the inspector. Saved as `bgColor`.
Header BackgroundColor control in the inspector. block.json default: #1e293b. Saved as `headerBg`.
Header TextColor control in the inspector. block.json default: #ffffff. Saved as `headerColor`.
Criteria Label BgColor control in the inspector. block.json default: #f1f5f9. Saved as `criteriaLabelBg`.
Criteria Label ColorColor control in the inspector. block.json default: #475569. Saved as `criteriaLabelColor`.
Cell BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `cellBg`.
Cell ColorColor control in the inspector. block.json default: #374151. Saved as `cellColor`.
Border ColorColor control in the inspector. block.json default: #e2e8f0. Saved as `borderColor`.
Winner BackgroundColor control in the inspector. block.json default: #eff6ff. Saved as `winnerBg`.
Winner ColorColor control in the inspector. block.json default: #1d4ed8. Saved as `winnerColor`.
Winner BorderColor control in the inspector. block.json default: #3b82f6. Saved as `winnerBorderColor`.
Total Row BgColor control in the inspector. block.json default: #f8fafc. Saved as `totalRowBg`.
Accent ColorColor control in the inspector. block.json default: #3b82f6. Saved as `accentColor`.

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

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Decision Matrix”. It sits under Blog. After insert, open Title and set “Show Title”, “Title — Title”, “Show Subtitle”, “Subtitle”.

Does Decision Matrix need a server or extra plugin?

No. After Blockenberg is active, the view script runs in the browser with the values you saved on the block.

Is the Decision Matrix Gutenberg block free?

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

Can I style Decision Matrix 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: Title, Options (, Criteria (, Display).

Related blog blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Decision Matrix from the Gutenberg inserter.

Get Blockenberg