Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

HeadingGroup

The HeadingGroup component controls the heading level hierarchy for any Heading components nested inside it. Use HeadingGroup to build a correct document outline without manually tracking heading levels. Each layer of nesting automatically increments the level by one (h1 becomes h2, h2 becomes h3, and so on).

HeadingGroup doesn't accept any props and doesn't render visible UI. It's a purely structural wrapper. For a visible content grouping that also increments heading levels, use Section instead.

Support
Targets (46)

Supported targets


Create a two-level title hierarchy for accessible screen reader navigation. This example uses HeadingGroup to nest a subsection under a parent Heading, so screen readers announce the correct levels.

Group related heading content

Create a two-level title hierarchy for accessible screen reader navigation. This example uses `HeadingGroup` to nest a subsection under a parent [Heading](/docs/api/admin-extensions/2025-07/ui-components/typography-and-content/heading), so screen readers announce the correct levels.

Group related heading content

import {reactExtension, HeadingGroup, Heading, Text, BlockStack} from '@shopify/ui-extensions-react/admin';

function App() {

return (
<BlockStack>
<Heading>Warehouse integration</Heading>
<HeadingGroup>
<Heading>Sync configuration</Heading>
<Text>
Configure how product data flows between Shopify and your warehouse
management system.
</Text>
</HeadingGroup>
</BlockStack>
);
}

export default reactExtension(
'admin.product-details.block.render',
() => <App />,
);
import {extension, HeadingGroup, Heading, Text, BlockStack} from '@shopify/ui-extensions/admin';

export default extension(
'admin.product-details.block.render',
(root) => {

const stack = root.createComponent(BlockStack);

const h1 = root.createComponent(
Heading,
{},
'Warehouse integration',
);

const group = root.createComponent(HeadingGroup);

const h2 = root.createComponent(
Heading,
{},
'Sync configuration',
);

const detail = root.createComponent(
Text,
{},
'Configure how product data flows between Shopify and your warehouse management system.',
);

group.appendChild(h2);
group.appendChild(detail);

stack.appendChild(h1);
stack.appendChild(group);
root.appendChild(stack);
},
);

  • Use HeadingGroup to build document structure: Nest HeadingGroup components to create a logical heading hierarchy rather than manually setting heading sizes. This ensures assistive technologies can navigate the content correctly.
  • Choose HeadingGroup or Section per nesting layer: Both HeadingGroup and Section increment the heading level, so use one or the other at each layer to avoid double-incrementing. Use Section when you want a visible content grouping, and HeadingGroup when you only need to adjust the heading hierarchy.
  • Keep nesting shallow: Avoid deeply nesting HeadingGroup components beyond three or four levels. Deeply nested headings (h5, h6) are rarely useful and can signal that the content structure needs simplification.

  • Heading levels stop incrementing at h6. Nesting HeadingGroup components beyond six levels will still render h6 headings.
  • Section also increments the heading level, so you typically choose one or the other for a given nesting layer—using both together will increment the level twice.

Was this page helpful?