Content · Gutenberg
Icon block for WordPress
Standalone styled icon with label, link, shape, animation, and rich customization.
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
Standalone styled icon with label, link, shape, animation, and rich customization.
Inspector panels on this block: Icon, Shape & Size, Label & Sub-Label, Link, Animation & Layout. Those titles come from index.js, not from a shared template.
Behavior controls: “Shape” options: Circle, Square, Rounded, Pill, No shape; “Animation” options: None, Bounce, Pulse, Float, Spin; “Animation & Layout — Alignment” options: Left, Center, Right.
Where to find it
Gutenberg inserter → Content → search “Icon” (block name `blockenberg/icon` in block.json). Style it in the sidebar after insert.
How to use Icon block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Icon”, insert it. Category: Content.
- Configure inspector controls that exist on this block. Open Icon. Set “Icon (emoji or symbol)”, “Shape”, “Icon Size (px)”, “Show Background”.
- 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
| Control | What the code does |
|---|---|
| Icon (emoji or symbol) | Text field in the inspector. block.json default: ⭐. Saved as `icon`. |
| Shape | Select control; the chosen value is saved on the block. Options: Circle; Square; Rounded; Pill; No shape. block.json default: circle. Saved as `shape`. |
| Icon Size (px) | Numeric range control in the inspector. Range 16–140. block.json default: 48. Saved as `iconSize`. |
| Show Background | On/off toggle in the inspector. On by default. Saved as `showBg`. |
| Background Size (px) | Numeric range control in the inspector. Range 32–200. block.json default: 96. Saved as `bgSize`. |
| Border Width (px) | Numeric range control in the inspector. Range 0–8. block.json default: 0. Saved as `borderWidth`. |
| Drop Shadow | On/off toggle in the inspector. Off by default. Saved as `shadow`. |
| Show Label | On/off toggle in the inspector. Off by default. Saved as `showLabel`. |
| Label Text | Text field in the inspector. Saved as `label`. |
| Show Sub-Label | On/off toggle in the inspector. Off by default. Saved as `showSubLabel`. |
| Sub-Label Text | Text field in the inspector. Saved as `subLabel`. |
| URL | Text field in the inspector. Saved as `linkUrl`. |
| Open in new tab | On/off toggle in the inspector. Off by default. Saved as `linkNewTab`. |
| Animation | Select control; the chosen value is saved on the block. Options: None; Bounce; Pulse; Float; Spin; Shake. block.json default: none. Saved as `animation`. |
| Animation & Layout — Alignment | Select control; the chosen value is saved on the block. Options: Left; Center; Right. block.json default: center. Saved as `align`. |
| Container Padding (px) | Numeric range control in the inspector. Range 0–80. block.json default: 16. Saved as `containerPadding`. |
| Gap between elements (px) | Numeric range control in the inspector. Range 0–40. block.json default: 10. Saved as `gap`. |
| Container Background | Color control in the inspector. Saved as `containerBg`. |
| Icon Background | Color control in the inspector. block.json default: #6366f1. Saved as `bgColor`. |
| Border Color | Color control in the inspector. block.json default: #6366f1. Saved as `borderColor`. |
| Label Color | Color control in the inspector. block.json default: #111827. Saved as `labelColor`. |
| Sub-Label Color | Color control in the inspector. block.json default: #6b7280. Saved as `subLabelColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts, data-rendered.
When this is the right block
- Standalone styled icon with label, link, shape, animation, and rich customization — that is the job of Icon, not a generic content block.
- Use it when you need the editor control labeled “Icon (emoji or symbol)”, which exists on this block’s inspector.
- It matches pages about icon, symbol, emoji.
- 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 Icon block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Icon”. It sits under Content. After insert, open Icon and set “Icon (emoji or symbol)”, “Shape”, “Icon Size (px)”, “Show Background”.
What makes Icon different from other Blockenberg blocks?
Standalone styled icon with label, link, shape, animation, and rich customization. Inspector labels on this block include “Icon (emoji or symbol)”, “Shape”, “Icon Size (px)”, “Show Background”.
Is the Icon Gutenberg block free?
Yes. Icon ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Icon 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: Icon, Shape & Size, Label & Sub-Label, Link).
Related content blocks
Icon Box
Single card with icon, title, text, and optional link button. Perfect for feature lists inside Row/Column.
Icon Accordion
Visually rich accordion with per-item icons, badges and custom colours — great for FAQs, feature lists and onboarding flows.
Icon Stats
Statistics displayed with large decorative icons, bold numbers, and descriptive labels.
Media & Text Rows
Repeatable alternating image-and-text rows — each row independently flippable. Classic landing-page pattern for feature breakdowns and storytelling.
Numbered List
Visual numbered or icon section — each item has a styled badge, heading, description, optional image and optional link. Ideal for steps, benefits, and 'why choose us' sections.
Styled List
Fully customizable list with icons, rich text, and flexible layout options.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Icon from the Gutenberg inserter.