Spacer

In this article


Add white space between blocks and customize its height.

  • Name: core/spacer
  • Category: design
  • API Version: 3
  • Block Type: Static (saved in post content)

Attributes

Defined via the attributes property in block.json.

Attribute Type Default Description
height string "100px"
width string

Supports

Defined via the supports property in block.json.

Context

Defined via the usesContext and providesContext properties in block.json.

Uses context:

  • orientation

Block Markup

This is a static block. The markup is saved directly in the post content.

<!-- wp:spacer {"height":"100px"} -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

Source