﻿{"id":136876,"date":"2021-08-10T23:54:48","date_gmt":"2021-08-10T23:54:48","guid":{"rendered":"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/components\/tools-panel-header\/"},"modified":"2026-09-04T14:34:11","modified_gmt":"2026-09-04T14:34:11","slug":"tools-panel-header","status":"publish","type":"blocks-handbook","link":"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/components\/tools-panel-header\/","title":{"rendered":"ToolsPanelHeader"},"content":{"rendered":"<p class=\"callout callout-alert\">This feature is still experimental. \u201cExperimental\u201d means this is an early implementation subject to drastic and breaking changes.<\/p>\n<p><\/p>\n<p>This component renders a tools panel&#8217;s header including a menu.<\/p>\n<h2>Usage<\/h2>\n<p>This component is generated automatically by its parent<br \/>\n<code>ToolsPanel<\/code>.<\/p>\n<p class=\"callout callout-alert\"><strong>In general, this should not be used directly.<\/strong><\/p>\n<h2>Props<\/h2>\n<h3><code>dropdownMenuProps<\/code>: <code>{}<\/code><\/h3>\n<p>The dropdown menu props to configure the panel&#8217;s <code>DropdownMenu<\/code>.<\/p>\n<ul>\n<li>Type: <code>DropdownMenuProps<\/code><\/li>\n<li>Required: No<\/li>\n<\/ul>\n<h3><code>headingLevel<\/code>: <code>1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6'<\/code><\/h3>\n<p>The heading level of the panel&#8217;s header.<\/p>\n<ul>\n<li>Required: No<\/li>\n<li>Default: <code>2<\/code><\/li>\n<\/ul>\n<h3><code>label<\/code>: <code>string<\/code><\/h3>\n<p>Text to be displayed within the panel header. It is also passed along as the<br \/>\n<code>label<\/code> for the panel header&#8217;s <code>DropdownMenu<\/code>.<\/p>\n<ul>\n<li>Required: Yes<\/li>\n<\/ul>\n<h3><code>resetAll<\/code>: <code>() =&gt; void<\/code><\/h3>\n<p>The <code>resetAll<\/code> prop provides the callback to execute when the &#8220;Reset all&#8221; menu<br \/>\nitem is selected. Its purpose is to facilitate resetting any control values<br \/>\nfor items contained within this header&#8217;s panel.<\/p>\n<ul>\n<li>Required: Yes<\/li>\n<\/ul>\n<h3><code>toggleItem<\/code>: <code>( label: string ) =&gt; void<\/code><\/h3>\n<p>This is executed when an individual control&#8217;s menu item is toggled. It<br \/>\nwill update the panel&#8217;s menu item state and call the panel item&#8217;s <code>onSelect<\/code> or<br \/>\n<code>onDeselect<\/code> callbacks as appropriate.<\/p>\n<ul>\n<li>Required: Yes<\/li>\n<\/ul>\n","protected":false},"author":0,"featured_media":0,"parent":134435,"menu_order":352,"template":"","meta":{"footnotes":""},"class_list":["post-136876","blocks-handbook","type-blocks-handbook","status-publish","hentry","type-handbook"],"revision_note":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/developer.wordpress.org\/wp-json\/wp\/v2\/blocks-handbook\/136876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.wordpress.org\/wp-json\/wp\/v2\/blocks-handbook"}],"about":[{"href":"https:\/\/developer.wordpress.org\/wp-json\/wp\/v2\/types\/blocks-handbook"}],"version-history":[{"count":9,"href":"https:\/\/developer.wordpress.org\/wp-json\/wp\/v2\/blocks-handbook\/136876\/revisions"}],"predecessor-version":[{"id":182966,"href":"https:\/\/developer.wordpress.org\/wp-json\/wp\/v2\/blocks-handbook\/136876\/revisions\/182966"}],"up":[{"embeddable":true,"href":"https:\/\/developer.wordpress.org\/wp-json\/wp\/v2\/blocks-handbook\/134435"}],"wp:attachment":[{"href":"https:\/\/developer.wordpress.org\/wp-json\/wp\/v2\/media?parent=136876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}