Icon


Insert an SVG icon.

  • Name: core/icon
  • Category: media
  • API Version: 3
  • Block Type: Dynamic (server-rendered)
  • Keywords: icon, svg

Attributes

Defined via the attributes property in block.json.

Attribute Type Default Description
icon string Role: content
flipHorizontal boolean false
flipVertical boolean false
rotation number 0

Supports

Defined via the supports property in block.json.

CSS Selectors

Defined via the selectors property in block.json.

  • root: .wp-block-icon svg
  • css: .wp-block-icon
  • spacing:
    • margin: .wp-block-icon

Block Markup

This is a dynamic block. It is rendered on the server and does not save HTML in post content.

In post content, it is stored as a block comment:

<!-- wp:icon /-->

Source