Title: Using block inspector sidebar groups
Author: Ryan Welcher
Published: June 2, 2023
Last modified: June 3, 2023

---

 * [Showcase](https://wordpress.org/showcase/)
 * [Plugins](https://wordpress.org/plugins/)
 * [Themes](https://wordpress.org/themes/)
 * [Hosting](https://wordpress.org/hosting/)
 * [News](https://wordpress.org/news/)
    - [Learn WordPress](https://learn.wordpress.org/)
    - [Documentation](https://wordpress.org/documentation/)
    - [Education](https://wordpress.org/education/)
    - [Forums](https://wordpress.org/support/forums/)
    - [Developers](https://developer.wordpress.org/)
    - [Blocks](https://wordpress.org/blocks/)
    - [Patterns](https://wordpress.org/patterns/)
    - [Photos](https://wordpress.org/photos/)
    - [Openverse ︎](https://openverse.org/)
    - [WordPress.tv ︎](https://wordpress.tv/)
 *  - [About WordPress](https://wordpress.org/about/)
    - [Make WordPress](https://make.wordpress.org/)
    - [Events](https://events.wordpress.org/)
    - [Five for the Future](https://wordpress.org/five-for-the-future/)
    - [Enterprise](https://wordpress.org/enterprise/)
    - [Gutenberg ︎](https://wordpress.org/gutenberg/)
    - [Job Board ︎](https://jobs.wordpress.net/)
 * [Swag ︎](https://mercantile.wordpress.org/)
 * [Get WordPress](https://wordpress.org/download/)

Search in WordPress.org

 [ Get WordPress ](https://wordpress.org/download/)

[WordPress Developer Blog](https://developer.wordpress.org/news)

 * [Snippets](https://developer.wordpress.org/news/snippets/)
    - [Blocks](https://developer.wordpress.org/news/category/blocks/)
    - [Concepts](https://developer.wordpress.org/news/category/concepts/)
    - [Common APIs](https://developer.wordpress.org/news/category/common-apis/)
    - [Design](https://developer.wordpress.org/news/category/design/)
    - [Playground](https://developer.wordpress.org/news/category/playground/)
    - [Plugins](https://developer.wordpress.org/news/category/plugins/)
    - [Themes](https://developer.wordpress.org/news/category/themes/)
 *  - [About this site](https://developer.wordpress.org/news/about/)
    - [Updates](https://developer.wordpress.org/news/category/updates/)
    - [How to contribute](https://developer.wordpress.org/news/how-to-contribute/)
    - [Tips and guidelines](https://developer.wordpress.org/news/tips-and-guidelines-for-writers/)
 * [Subscribe](https://developer.wordpress.org/news/subscribe/)
 * [Developer Resources](https://developer.wordpress.org/)

 * [Snippets](https://developer.wordpress.org/news/snippets/)
    - [Blocks](https://developer.wordpress.org/news/category/blocks/)
    - [Concepts](https://developer.wordpress.org/news/category/concepts/)
    - [Common APIs](https://developer.wordpress.org/news/category/common-apis/)
    - [Design](https://developer.wordpress.org/news/category/design/)
    - [Playground](https://developer.wordpress.org/news/category/playground/)
    - [Plugins](https://developer.wordpress.org/news/category/plugins/)
    - [Themes](https://developer.wordpress.org/news/category/themes/)
 *  - [About this site](https://developer.wordpress.org/news/about/)
    - [Updates](https://developer.wordpress.org/news/category/updates/)
    - [How to contribute](https://developer.wordpress.org/news/how-to-contribute/)
    - [Tips and guidelines](https://developer.wordpress.org/news/tips-and-guidelines-for-writers/)
 * [Subscribe](https://developer.wordpress.org/news/subscribe/)
 * [Developer Resources](https://developer.wordpress.org/)

# 󠀁[Using block inspector sidebar groups](https://developer.wordpress.org/news/2023/06/using-block-inspector-sidebar-groups/)󠁿

By [Ryan Welcher](https://profiles.wordpress.org/welcher/)

June 2, 2023

[Advanced](https://developer.wordpress.org/news/category/advanced/), [Blocks](https://developer.wordpress.org/news/category/blocks/),
[Plugins](https://developer.wordpress.org/news/category/plugins/)

Building custom blocks generally means adding controls to the Block Inspector sidebar.
You do that with the `<InspectorControls>` component, and until WordPress 6.2 arrived,
the settings were all in one place.

Before WordPress 6.2

![block inspector controls in a single column](https://developer.wordpress.org/news/
files/2023/06/pre-6.2-example-1024x581.png)

WordPress 6.2 brought[ tabs to the Block Inspector](https://make.wordpress.org/core/2023/03/07/introduction-of-block-inspector-tabs/).
Now, items that control settings and ones that manage styles live under separate
tabs, so you can see more clearly which you’re working on..

As you can see, now you have a lot more places to put  your custom controls. How
do you target them?

## Available Locations

The process has not changed; you still use the `<InspectorControls>`  component.
But in 6.2, the new group prop lets you target where the control will appear.

`group` accepts these predefined locations, which each target a specific area::

 * `settings` (default)
 * `styles`
 * `color`
 * t`ypography`
 * `dimensions`
 * `border`
 * `advanced`

### Settings and Styles Panels

The settings and styles options target the Settings and Styles panels and will add
items to the bottom of each. If the group prop is missing from `<InspectorControls
>` (or its value is set to `settings`), the control will go into the Settings section.

For example, this code adds a custom control to the Settings tab.

    ```language-jsx
    /**
     * WordPress dependencies
     */
    import { __ } from '@wordpress/i18n';
    import { useBlockProps, InspectorControls } from '@wordpress/block-editor';
    import { PanelBody } from '@wordpress/components';

    /**
     * Internal dependencies
     */
    import './editor.scss';

    /**
     * Edit Component
     */
    export default function Edit() {
    	return (
    		<div { ...useBlockProps() }>
    			{ __(
    				'Inspector Control Groups Block',
    				'inspector-control-groups'
    			) }
    			<InspectorControls>
    				<PanelBody
    					title={ __(
    						'Custom Block Controls',
    						'inspector-control-groups'
    					) }
    				>
    					{ __(
    						'Custom block controls added using the InspectorControls component',
    						'inspector-control-groups'
    					) }
    				</PanelBody>
    			</InspectorControls>
    		</div>
    	);
    }
    ```

![block inspector controls showing a custom section in the Settings panel](https://
developer.wordpress.org/news/files/2023/06/image-1-1024x490.png)

If you wanted to have this control appear in the Styles tab instead, you could add
the `group` prop and set it to `styles`.

    ```language-jsx
    export default function Edit() {
    	return (
    		<div { ...useBlockProps() }>
    			{ __(
    				'Inspector Control Groups Block',
    				'inspector-control-groups'
    			) }
    			<InspectorControls group="styles">
    				<PanelBody
    					title={ __(
    						'Custom Block Controls',
    						'inspector-control-groups'
    					) }
    				>
    					{ __(
    						'Custom block controls added using the InspectorControls component',
    						'inspector-control-groups'
    					) }
    				</PanelBody>
    			</InspectorControls>
    		</div>
    	);
    }
    ```

![block inspector controls showing a custom section in the Styles panel](https://
developer.wordpress.org/news/files/2023/06/image-2-1024x529.png)

You might notice that the Settings tab has disappeared. That’s because your controls
are no longer targeting the settings section, and there are no other controls that
will show up there. If you added another `<InspectorControls>` component without
a `group` prop (or set it to `settings`), the Settings tab would appear.

### Inside the Styles Panel

It’s pretty easy to target each of the inner panels of the Styles tab. You do it
by passing  one of `color`, `typography`, `dimensions`, or `border` to the `group`
prop.

    ```language-jsx
    export default function Edit() {
    	return (
    		<div { ...useBlockProps() }>
    			{ __(
    				'Inspector Control Groups Block',
    				'inspector-control-groups'
    			) }
    			<InspectorControls group="color">
    				<div className="full-width-control-wrapper">
    					{ __(
    						"I'm in the colors group!",
    						'inspector-control-groups'
    					) }
    				</div>
    			</InspectorControls>
    			<InspectorControls group="typography">
    				<div className="full-width-control-wrapper">
    					{ __(
    						"I'm in the typography group!",
    						'inspector-control-groups'
    					) }
    				</div>
    			</InspectorControls>
    			<InspectorControls group="dimensions">
    				<div className="full-width-control-wrapper">
    					{ __(
    						"I'm in the dimensions group!",
    						'inspector-control-groups'
    					) }
    				</div>
    			</InspectorControls>
    			<InspectorControls group="border">
    				<div className="full-width-control-wrapper">
    					{ __(
    						"I'm in the border group!",
    						'inspector-control-groups'
    					) }
    				</div>
    			</InspectorControls>
    		</div>
    	);
    }
    ```

One thing to note here: the items in these areas are using CSS Grid. To have your
component span the full width you will need to add some CSS to the wrapper element
in your blocks stylesheet.

    ```language-css
    .full-width-control-wrapper {
    	grid-column: 1 / -1;
    }
    ```

### The Advanced area

You insert items into the Advanced area by setting `group` to `advanced` or by using
the `<InspectorAdvancedControls>` component.

    ```language-jsx
    export default function Edit() {
    	return (
    		<div { ...useBlockProps() }>
    			{ __(
    				'Inspector Control Groups Block',
    				'inspector-control-groups'
    			) }
    			<InspectorAdvancedControls>
    				{ __(
    					"I'm in the advanced group!",
    					'inspector-control-groups'
    				) }
    			</InspectorAdvancedControls>

    			<InspectorControls group="advanced">
    				{ __(
    					"I'm in the advanced group!",
    					'inspector-control-groups'
    				) }
    			</InspectorControls>
    		</div>
    	);
    }
    ```

This article has barely touched the surface–it’s brief by design. But with this 
new feature, you’ll have a lot more control over block UI. And as you explore, you’ll
no doubt find many more ways to build simple and intuitive UIs.

_Thank you to [@bph](https://profiles.wordpress.org/bph/), [@greenshady](https://profiles.wordpress.org/greenshady/),_
[@ndiego](https://profiles.wordpress.org/ndiego/),_ _[@marybaum](https://profiles.wordpress.org/marybaum/),
_and _[@mburridge](https://profiles.wordpress.org/mburridge/)_ for reviewing this
post._

**Categories:** [Advanced](https://developer.wordpress.org/news/category/advanced/),
[Blocks](https://developer.wordpress.org/news/category/blocks/), [Plugins](https://developer.wordpress.org/news/category/plugins/)

**Tags:** [Block development](https://developer.wordpress.org/news/tag/block-development/),
[Extenders](https://developer.wordpress.org/news/tag/extenders/)

## 4 responses to “Using block inspector sidebar groups”

 1.  ![Ryan Welcher Avatar](https://secure.gravatar.com/avatar/865d90ad698b325440361a71943d729f8ad5c44c66a6d65c5a046a8323ac7ced?
     s=40&d=identicon&r=g)
 2.  [Ryan Welcher](https://profiles.wordpress.org/welcher/)
 3.  [June 2, 2023](https://developer.wordpress.org/news/2023/06/using-block-inspector-sidebar-groups/#comment-1246)
 4.  As of the time of writing, there is no documentation around the group prop. You
     can follow the status via this issue – [https://github.com/WordPress/gutenberg/issues/51198](https://github.com/WordPress/gutenberg/issues/51198)
 5.  [Reply](https://developer.wordpress.org/news/2023/06/using-block-inspector-sidebar-groups/?replytocom=1246#respond)
 6.   a. ![Lars Faye Avatar](https://secure.gravatar.com/avatar/cc2e219a01956d769cc2fce0dbf5a28f7aea8462a2eef1eef472c3b5af3be075?
         s=40&d=identicon&r=g)
      b. [Lars Faye](https://chee.studio)
      c. [June 8, 2023](https://developer.wordpress.org/news/2023/06/using-block-inspector-sidebar-groups/#comment-1255)
      d. The time it took to make this blog post, they could have just written some documentation.
      e. [Reply](https://developer.wordpress.org/news/2023/06/using-block-inspector-sidebar-groups/?replytocom=1255#respond)
      f.  a. ![Birgit Pauli-Haack Avatar](https://secure.gravatar.com/avatar/a7873a730eebbbf667e941eaefba2f3f16ee7fe49a5661507569ada7f46b94dc?
             s=40&d=identicon&r=g)
          b. [Birgit Pauli-Haack](https://profiles.wordpress.org/bph/)
          c. [June 19, 2023](https://developer.wordpress.org/news/2023/06/using-block-inspector-sidebar-groups/#comment-1285)
          d. Hi Lars,
              We do have a fairly large backlog of update to the documentation, 
             indeed. And it will be updated in due time. In the meantime, it was important
             that developers get the update about the “groups” as it improves the flexibility
             and granularity how block editor can be extended. Is there something eles you’re
             trying to find that you’re not seeing?
          e. [Reply](https://developer.wordpress.org/news/2023/06/using-block-inspector-sidebar-groups/?replytocom=1285#respond)
 7.  ![Fábio Blanco Avatar](https://secure.gravatar.com/avatar/694a26a216284f6ad2711f4fa3c823df338b61c8a5f5c0cbaa25a9540d4a93aa?
     s=40&d=identicon&r=g)
 8.  [Fábio Blanco](https://globalbyte.com.br)
 9.  [July 13, 2024](https://developer.wordpress.org/news/2023/06/using-block-inspector-sidebar-groups/#comment-7412)
 10. The group prop is really welcome but is there any tab prop? I would like to create
     my own group for a specific block aggregating styles, color, typography and dimensions
     settings and, naturally it would be nice to have all those settings in the Appearance
     tab but all grouped together. From a user point of view, it would be better to
     have all Stilling settings for the same block grouped together. Is it possible?
 11. [Reply](https://developer.wordpress.org/news/2023/06/using-block-inspector-sidebar-groups/?replytocom=7412#respond)

### Leave a Reply 󠀁[Cancel reply](https://developer.wordpress.org/news/2023/06/using-block-inspector-sidebar-groups/?output_format=md#respond)󠁿

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

 Save my name, email, and website in this browser for the next time I comment.

 Notify me of follow-up comments by email.

 Notify me of new posts by email.

Δ

## Have an idea for a new post?

### 󠀁[Learn how to contribute](https://developer.wordpress.org/news/how-to-contribute/)󠁿

Share your knowledge with fellow WordPress developers.

Search

### 󠀁[Review tips and guidelines](https://developer.wordpress.org/news/tips-and-guidelines-for-writers/)󠁿

Everything you need to know about writing for the Blog.

## Subscribe to the Blog

  Email Address

 Join 1,946 other subscribers

 * [About](https://wordpress.org/about/)
 * [News](https://wordpress.org/news/)
 * [Hosting](https://wordpress.org/hosting/)
 * [Privacy](https://wordpress.org/about/privacy/)

 * [Showcase](https://wordpress.org/showcase/)
 * [Themes](https://wordpress.org/themes/)
 * [Plugins](https://wordpress.org/plugins/)
 * [Patterns](https://wordpress.org/patterns/)

 * [Learn](https://learn.wordpress.org/)
 * [Documentation](https://wordpress.org/documentation/)
 * [Developers](https://developer.wordpress.org/)
 * [WordPress.tv ](https://wordpress.tv/)

 * [Get Involved](https://make.wordpress.org/)
 * [Events](https://events.wordpress.org/)
 * [Donate ](https://wordpressfoundation.org/donate/)
 * [Swag ](https://mercantile.wordpress.org/)

 * [WordPress.com ](https://wordpress.com/?ref=wporg-footer)
 * [Matt ](https://ma.tt/)
 * [bbPress ](https://bbpress.org/)
 * [BuddyPress ](https://buddypress.org/)

 The WordPress® trademark is the intellectual property of the WordPress Foundation.

 * [Visit our X (formerly Twitter) account](https://www.x.com/WordPress)
 * [Visit our Bluesky account](https://bsky.app/profile/wordpress.org)
 * [Visit our Mastodon account](https://mastodon.world/@WordPress)
 * [Visit our Threads account](https://www.threads.net/@wordpress)
 * [Visit our Facebook page](https://www.facebook.com/WordPress/)
 * [Visit our Instagram account](https://www.instagram.com/wordpress/)
 * [Visit our LinkedIn account](https://www.linkedin.com/company/wordpress)
 * [Visit our TikTok account](https://www.tiktok.com/@wordpress)
 * [Visit our YouTube channel](https://www.youtube.com/wordpress)
 * [Visit our Tumblr account](https://wordpress.tumblr.com/)