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.

Get Blockenberg

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

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Icon”, insert it. Category: Content.
  3. Configure inspector controls that exist on this block. Open Icon. Set “Icon (emoji or symbol)”, “Shape”, “Icon Size (px)”, “Show Background”.
  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
Icon (emoji or symbol)Text field in the inspector. block.json default: ⭐. Saved as `icon`.
ShapeSelect 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 BackgroundOn/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 ShadowOn/off toggle in the inspector. Off by default. Saved as `shadow`.
Show LabelOn/off toggle in the inspector. Off by default. Saved as `showLabel`.
Label TextText field in the inspector. Saved as `label`.
Show Sub-LabelOn/off toggle in the inspector. Off by default. Saved as `showSubLabel`.
Sub-Label TextText field in the inspector. Saved as `subLabel`.
URLText field in the inspector. Saved as `linkUrl`.
Open in new tabOn/off toggle in the inspector. Off by default. Saved as `linkNewTab`.
AnimationSelect 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 — AlignmentSelect 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 BackgroundColor control in the inspector. Saved as `containerBg`.
Icon BackgroundColor control in the inspector. block.json default: #6366f1. Saved as `bgColor`.
Border ColorColor control in the inspector. block.json default: #6366f1. Saved as `borderColor`.
Label ColorColor control in the inspector. block.json default: #111827. Saved as `labelColor`.
Sub-Label ColorColor control in the inspector. block.json default: #6b7280. Saved as `subLabelColor`.

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 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

Get Blockenberg

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

Get Blockenberg