Content · Gutenberg
Content Box block for WordPress
Styled content container with optional icon/emoji, badge label, title, rich body text, style variants (info/warning/success/tip/quote), border, background, and rounded corners.
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
Styled content container with optional icon/emoji, badge label, title, rich body text, style variants (info/warning/success/tip/quote), border, background, and rounded corners.
Inspector panels on this block: Style Variant, Content, Border & Shape, Custom Colors. Those titles come from index.js, not from a shared template.
Behavior controls: “Variant” options: 🔵 Info, 🟡 Warning, 🟢 Success, 🟣 Tip, ⬜ Quote; “Icon Position” options: Left, Top; “Border Side” options: Left, Top, All sides, None.
Where to find it
Gutenberg inserter → Content → search “Content Box” (block name `blockenberg/content-box` in block.json). Style it in the sidebar after insert.
How to use Content Box block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Content Box”, insert it. Category: Content.
- Configure inspector controls that exist on this block. Open Style Variant. Set “Variant”, “Show Icon”, “Icon Position”, “Show Badge”.
- 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
| Control | What the code does |
|---|---|
| Variant | Select control; the chosen value is saved on the block. Options: 🔵 Info; 🟡 Warning; 🟢 Success; 🟣 Tip; ⬜ Quote; ⚙️ Custom. block.json default: info. Saved as `variant`. |
| Show Icon | On/off toggle in the inspector. On by default. Saved as `showIcon`. |
| Icon Position | Select control; the chosen value is saved on the block. Options: Left; Top. block.json default: left. Saved as `iconLayout`. |
| Show Badge | On/off toggle in the inspector. On by default. Saved as `showBadge`. |
| Badge Text | Text field in the inspector. block.json default: Note. Saved as `badge`. |
| Show Title | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Border Side | Select control; the chosen value is saved on the block. Options: Left; Top; All sides; None. block.json default: left. Saved as `borderPosition`. |
| Border Width (px) | Numeric range control in the inspector. Range 1–12. block.json default: 4. Saved as `borderWidth`. |
| Border Radius (px) | Numeric range control in the inspector. Range 0–32. block.json default: 8. Saved as `borderRadius`. |
| Padding Top/Bottom (px) | Numeric range control in the inspector. Range 8–64. block.json default: 20. Saved as `paddingV`. |
| Padding Left/Right (px) | Numeric range control in the inspector. Range 8–64. block.json default: 24. Saved as `paddingH`. |
| Max Width (0 = full) | Numeric range control in the inspector. Range 0–1200. block.json default: 0. Saved as `maxWidth`. |
| Icon Size (px) | Numeric range control in the inspector. Range 14–60. block.json default: 28. Saved as `iconSize`. |
| Typography — Title | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoTitle`. |
| Body | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoBody`. |
| Box Background | Color control in the inspector. Saved as `bgColor`. |
| Border Color | Color control in the inspector. Saved as `borderColor`. |
| Title Color | Color control in the inspector. Saved as `titleColor`. |
| Body Text Color | Color control in the inspector. Saved as `textColor`. |
| Badge Background | Color control in the inspector. Saved as `badgeBg`. |
| Badge Text | Color control in the inspector. Saved as `badgeColor`. |
| Icon Color | Color control in the inspector. Saved as `iconColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts.
When this is the right block
- Styled content container with optional icon/emoji, badge label, title, rich body text, style variants (info/warning/success/tip/quote), border, background, and rounded corners — that is the job of Content Box, not a generic content block.
- Use it when you need the editor control labeled “Variant”, which exists on this block’s inspector.
- It matches pages about content, box, callout.
- Inserter grouping: articles, cards, lists, and long-form 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 Content Box block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Content Box”. It sits under Content. After insert, open Style Variant and set “Variant”, “Show Icon”, “Icon Position”, “Show Badge”.
What makes Content Box different from other Blockenberg blocks?
Styled content container with optional icon/emoji, badge label, title, rich body text, style variants (info/warning/success/tip/quote), border, background, and rounded corners. Inspector labels on this block include “Variant”, “Show Icon”, “Icon Position”, “Show Badge”.
Is the Content Box Gutenberg block free?
Yes. Content Box ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Content Box 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: Style Variant, Content, Border & Shape, Custom Colors).
Related content blocks
Callout
Highlighted panel for tips, warnings or success messages with icon, title and dismissible option.
Alert / Notice
Info, success, warning or error notice block with icon, title and body text. Pure CSS — zero JS.
Sticky Note
Colored post-it style note with optional rotation, shadow, curl corner and handwritten font.
Content Slider
Full-slide carousel with custom backgrounds per slide (color, gradient, or image) and rich text content.
Content Warning
Editorial content advisory or sensitivity notice, optionally collapsible.
Icon Box
Single card with icon, title, text, and optional link button. Perfect for feature lists inside Row/Column.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Content Box from the Gutenberg inserter.