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.
Heading
The Heading component renders a title for sections of content. Use Heading to label groups of related information and create a scannable visual hierarchy within your extension.
The rendered heading level (h1–h6) is automatically determined by how deeply the Heading is nested within HeadingGroup or Section components, so you don't need to manage levels manually. For body text and inline content, use Text or Paragraph.
Supported targets
- admin.
abandoned-checkout-details. action. render - admin.
abandoned-checkout-details. block. render - admin.
catalog-details. action. render - admin.
catalog-details. block. render - admin.
collection-details. action. render - admin.
collection-details. block. render - admin.
collection-index. action. render - admin.
company-details. action. render - admin.
company-details. block. render - admin.
company-location-details. block. render - admin.
customer-details. action. render - admin.
customer-details. block. render - admin.
customer-index. action. render - admin.
customer-index. selection-action. render - admin.
customer-segment-details. action. render - admin.
discount-details. action. render - admin.
discount-details. function-settings. render - admin.
discount-index. action. render - admin.
draft-order-details. action. render - admin.
draft-order-details. block. render - admin.
draft-order-index. action. render - admin.
draft-order-index. selection-action. render - admin.
gift-card-details. action. render - admin.
gift-card-details. block. render - admin.
order-details. action. render - admin.
order-details. block. render - admin.
order-details. print-action. render - admin.
order-fulfilled-card. action. render - admin.
order-index. action. render - admin.
order-index. selection-action. render - admin.
order-index. selection-print-action. render - admin.
product-details. action. render - admin.
product-details. block. render - admin.
product-details. configuration. render - admin.
product-details. print-action. render - admin.
product-details. reorder. render - admin.
product-index. action. render - admin.
product-index. selection-action. render - admin.
product-index. selection-print-action. render - admin.
product-purchase-option. action. render - admin.
product-variant-details. action. render - admin.
product-variant-details. block. render - admin.
product-variant-details. configuration. render - admin.
product-variant-purchase-option. action. render - admin.
settings. order-routing-rule. render - admin.
settings. validation. render
Supported targets
- admin.
abandoned-checkout-details. action. render - admin.
abandoned-checkout-details. block. render - admin.
catalog-details. action. render - admin.
catalog-details. block. render - admin.
collection-details. action. render - admin.
collection-details. block. render - admin.
collection-index. action. render - admin.
company-details. action. render - admin.
company-details. block. render - admin.
company-location-details. block. render - admin.
customer-details. action. render - admin.
customer-details. block. render - admin.
customer-index. action. render - admin.
customer-index. selection-action. render - admin.
customer-segment-details. action. render - admin.
discount-details. action. render - admin.
discount-details. function-settings. render - admin.
discount-index. action. render - admin.
draft-order-details. action. render - admin.
draft-order-details. block. render - admin.
draft-order-index. action. render - admin.
draft-order-index. selection-action. render - admin.
gift-card-details. action. render - admin.
gift-card-details. block. render - admin.
order-details. action. render - admin.
order-details. block. render - admin.
order-details. print-action. render - admin.
order-fulfilled-card. action. render - admin.
order-index. action. render - admin.
order-index. selection-action. render - admin.
order-index. selection-print-action. render - admin.
product-details. action. render - admin.
product-details. block. render - admin.
product-details. configuration. render - admin.
product-details. print-action. render - admin.
product-details. reorder. render - admin.
product-index. action. render - admin.
product-index. selection-action. render - admin.
product-index. selection-print-action. render - admin.
product-purchase-option. action. render - admin.
product-variant-details. action. render - admin.
product-variant-details. block. render - admin.
product-variant-details. configuration. render - admin.
product-variant-purchase-option. action. render - admin.
settings. order-routing-rule. render - admin.
settings. validation. render
Anchor to PropertiesProperties
Props for the Heading component. The heading's semantic level is determined automatically by the nesting depth of HeadingGroup or Section ancestors; use the size prop to control its visual appearance independently.
- Anchor to idididstringstring
A unique identifier for the heading.
- Anchor to sizesizesizeLevelLevel
The visual size of the heading, from
1(largest) to6(smallest). This controls appearance only and doesn't set the semantic heading level. The actual heading level rendered for assistive technologies is determined automatically by the nesting depth of parent HeadingGroup or Section components.
Level
A heading level from `1` (largest / most prominent) to `6` (smallest / least prominent). Controls visual size only. The semantic HTML heading level is determined by HeadingGroup or Section nesting.
1 | 2 | 3 | 4 | 5 | 6Anchor to ExamplesExamples
Anchor to Label extension sectionsLabel extension sections
Add a title and description to a product analytics block. This example renders a Heading above descriptive Text inside a BlockStack.
Label extension sections
 inside a [BlockStack](/docs/api/admin-extensions/2025-07/ui-components/layout-and-structure/blockstack).](https://cdn.shopify.com/shopifycloud/shopify-dev/production/assets/assets/images/templated-apis-screenshots/admin-extensions/2025-07/heading-default-EsE4yqIL.png)
Label extension sections
React
import {reactExtension, Heading, Text, BlockStack} from '@shopify/ui-extensions-react/admin';
function App() {
return (
<BlockStack>
<Heading>Product analytics</Heading>
<Text>
View real-time performance metrics synced from your analytics provider.
</Text>
</BlockStack>
);
}
export default reactExtension(
'admin.product-details.block.render',
() => <App />,
);TS
import {extension, Heading, Text, BlockStack} from '@shopify/ui-extensions/admin';
export default extension(
'admin.product-details.block.render',
(root) => {
const stack = root.createComponent(BlockStack);
const heading = root.createComponent(
Heading,
{},
'Product analytics',
);
const detail = root.createComponent(
Text,
{},
'View real-time performance metrics synced from your analytics provider.',
);
stack.appendChild(heading);
stack.appendChild(detail);
root.appendChild(stack);
},
);Anchor to Create hierarchical content sectionsCreate hierarchical content sections
Control heading size using the size prop to create visual hierarchy. This example renders a size-2 heading for the extension title and a size-3 sub-heading for a detail section, mirroring the Shopify admin's native content structure.
Create hierarchical content sections
React
import {reactExtension, Heading, Text, BlockStack} from '@shopify/ui-extensions-react/admin';
function App() {
return (
<BlockStack>
<Heading size={2}>Warehouse integration</Heading>
<Text>
Manage inventory sync and fulfillment settings for this product.
</Text>
<Heading size={3}>Sync history</Heading>
<Text>
Last synced 15 minutes ago — 3 variants updated successfully.
</Text>
</BlockStack>
);
}
export default reactExtension(
'admin.product-details.block.render',
() => <App />,
);TS
import {extension, Heading, Text, BlockStack} from '@shopify/ui-extensions/admin';
export default extension(
'admin.product-details.block.render',
(root) => {
const stack = root.createComponent(BlockStack);
const primary = root.createComponent(
Heading,
{size: 2},
'Warehouse integration',
);
const section = root.createComponent(
Text,
{},
'Manage inventory sync and fulfillment settings for this product.',
);
const sub = root.createComponent(
Heading,
{size: 3},
'Sync history',
);
const detail = root.createComponent(
Text,
{},
'Last synced 15 minutes ago — 3 variants updated successfully.',
);
stack.appendChild(primary);
stack.appendChild(section);
stack.appendChild(sub);
stack.appendChild(detail);
root.appendChild(stack);
},
);Anchor to Build accessible section labelsBuild accessible section labels
Create accessible section labels using the id prop inside a Section component. This example nests a heading within a section to maintain proper document outline so screen readers announce the section context correctly.
Build accessible section labels
React
import {reactExtension, Heading, Section, Text, BlockStack} from '@shopify/ui-extensions-react/admin';
function App() {
return (
<BlockStack>
<Section heading="Custom fields">
<Heading id="metafields-heading">Metafield values</Heading>
<Text>
These custom fields are synced with your external product information
management system.
</Text>
</Section>
</BlockStack>
);
}
export default reactExtension(
'admin.product-details.block.render',
() => <App />,
);TS
import {extension, Heading, Section, Text, BlockStack} from '@shopify/ui-extensions/admin';
export default extension(
'admin.product-details.block.render',
(root) => {
const stack = root.createComponent(BlockStack);
const section = root.createComponent(
Section,
{heading: 'Custom fields'},
);
const heading = root.createComponent(
Heading,
{id: 'metafields-heading'},
'Metafield values',
);
const description = root.createComponent(
Text,
{},
'These custom fields are synced with your external product information management system.',
);
section.appendChild(heading);
section.appendChild(description);
stack.appendChild(section);
root.appendChild(stack);
},
);Anchor to Best practicesBest practices
- Let the heading level be determined automatically: Wrap Heading components in HeadingGroup or Section components to produce a logical heading hierarchy. Avoid manually setting
sizeto simulate heading levels. - Use one primary heading per section: Each Section or HeadingGroup should typically contain one Heading that describes its content. Multiple headings at the same level within a single section can confuse screen reader users.
- Keep headings concise: Write headings that clearly and briefly describe the section content. Merchants scan headings to find relevant sections, so short, descriptive titles work best.
- Don't skip heading levels: Use nested HeadingGroup or Section components to create a natural hierarchy (h1 → h2 → h3). Skipping levels (h1 → h3) makes the document outline confusing for assistive technologies.
Anchor to LimitationsLimitations
- The
sizeprop controls the visual size of the heading but not the semantic level. The rendered heading level (h1–h6) is determined by the nesting depth of parent HeadingGroup and Section components. This means a visually large heading might render as an h3 if nested inside two HeadingGroup components. - The maximum heading level is h6. Further nesting beyond six levels of HeadingGroup or Section components will still render as h6.
- Heading doesn't support font weight, color, or alignment props. It always renders with the default heading style for its level. For inline text with custom typographic styling, use the Text component.