Column

A single column within a columns block.

This block is available in the latest version of WordPress and does not require the Gutenberg plugin.

Category:

For developers

Block Grammar & Markup

<!-- wp:column -->
<div class="wp-block-column">
	<!-- wp:paragraph -->
	<p>Column One, Paragraph One</p>
	<!-- /wp:paragraph -->
	<!-- wp:paragraph -->
	<p>Column One, Paragraph Two</p>
	<!-- /wp:paragraph -->
</div>
<!-- /wp:columns -->

Parent

Optional. Type: Array.

Blocks are able to be inserted into blocks that use InnerBlocks as nested content. Setting parent lets a block require that it is only available when nested within the specified blocks.

Documentation

[
  "core/columns"
]

Block Attributes

Optional. Type: Object.

Attributes provide the structured data needs of a block. They can exist in different forms when they are serialized, but they are declared together under a common interface.

Documentation

{
  "verticalAlignment": {
    "type": "string"
  },
  "width": {
    "type": "string"
  },
  "allowedBlocks": {
    "type": "array"
  },
  "templateLock": {
    "type": [
      "string",
      "boolean"
    ],
    "enum": [
      "all",
      "insert",
      "contentOnly",
      false
    ]
  },
  "layout": {
    "type": "object"
  },
  "anchor": {
    "type": "string",
    "source": "attribute",
    "attribute": "id",
    "selector": "*"
  }
}

Block Supports

Optional. Type: Object.

A set of options that enables or disables block controls in the editor, for example gradient colors or padding.

Documentation

{
  "anchor": true,
  "reusable": false,
  "html": false,
  "color": {
    "gradients": true,
    "link": true,
    "__experimentalDefaultControls": {
      "background": true,
      "text": true
    }
  },
  "spacing": {
    "blockGap": true,
    "padding": true,
    "__experimentalDefaultControls": {
      "padding": true
    }
  },
  "__experimentalBorder": {
    "color": true,
    "style": true,
    "width": true,
    "__experimentalDefaultControls": {
      "color": true,
      "style": true,
      "width": true
    }
  },
  "typography": {
    "fontSize": true,
    "lineHeight": true,
    "__experimentalFontFamily": true,
    "__experimentalFontWeight": true,
    "__experimentalFontStyle": true,
    "__experimentalTextTransform": true,
    "__experimentalTextDecoration": true,
    "__experimentalLetterSpacing": true,
    "__experimentalDefaultControls": {
      "fontSize": true
    }
  },
  "__experimentalLayout": true
}