Group

Gather blocks in a layout container.

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

Category:

Block variations: Row, stack.


For developers

Block Grammar & Markup

<!-- wp:group {"align":"full","backgroundColor":"secondary","layout":{"type":"default"}} -->
<div class="wp-block-group alignfull has-secondary-background-color has-background">
	<!-- wp:paragraph -->
	<p>This is a group block.</p>
	<!-- /wp:paragraph -->

	<!-- wp:paragraph -->
	<p>Group block content.</p>
	<!-- /wp:paragraph -->
	</div>
	<!-- /wp:group -->

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

{
  "tagName": {
    "type": "string",
    "default": "div"
  },
  "templateLock": {
    "type": [
      "string",
      "boolean"
    ],
    "enum": [
      "all",
      "insert",
      "contentOnly",
      false
    ]
  },
  "layout": {
    "type": "object"
  },
  "anchor": {
    "type": "string",
    "source": "attribute",
    "attribute": "id",
    "selector": "*"
  },
  "ariaLabel": {
    "type": "string",
    "source": "attribute",
    "attribute": "aria-label",
    "selector": "*"
  },
  "settings": {
    "type": "object"
  }
}

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

{
  "__experimentalOnEnter": true,
  "__experimentalSettings": true,
  "align": [
    "wide",
    "full"
  ],
  "anchor": true,
  "ariaLabel": true,
  "html": false,
  "color": {
    "gradients": true,
    "link": true,
    "__experimentalDefaultControls": {
      "background": true,
      "text": true
    }
  },
  "spacing": {
    "margin": [
      "top",
      "bottom"
    ],
    "padding": true,
    "blockGap": true,
    "__experimentalDefaultControls": {
      "padding": true,
      "blockGap": true
    }
  },
  "dimensions": {
    "minHeight": true
  },
  "__experimentalBorder": {
    "color": true,
    "radius": true,
    "style": true,
    "width": true,
    "__experimentalDefaultControls": {
      "color": true,
      "radius": true,
      "style": true,
      "width": true
    }
  },
  "position": {
    "sticky": true
  },
  "typography": {
    "fontSize": true,
    "lineHeight": true,
    "__experimentalFontFamily": true,
    "__experimentalFontWeight": true,
    "__experimentalFontStyle": true,
    "__experimentalTextTransform": true,
    "__experimentalTextDecoration": true,
    "__experimentalLetterSpacing": true,
    "__experimentalDefaultControls": {
      "fontSize": true
    }
  },
  "__experimentalLayout": {
    "allowSizingOnChildren": true
  }
}

Transforms

Optional. Type: Object.

Transforms provide rules for what a block can be transformed from and what it can be transformed to.

Documentation

Transforms from: Any.

Transforms to: Any.