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.
BlockStack
The BlockStack component arranges its children vertically (along the block axis) with configurable spacing between them. Use it to stack elements like headings, paragraphs, form fields, and buttons in a column layout.
For horizontal arrangement, use InlineStack.
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 BlockStack component, which arranges its children in a vertical stack (block axis). Use BlockStack to lay out components vertically with consistent spacing and alignment.
- Anchor to accessibilityLabelaccessibilityLabelaccessibilityLabelstringstring
A label that describes the purpose or contents of the element. When set, it will be announced to users using assistive technologies and will provide them with more context. When set, any children or
labelsupplied won't be announced to screen readers.- Anchor to accessibilityRoleaccessibilityRoleaccessibilityRoleAccessibilityRoleAccessibilityRoleDefault: 'generic'Default: 'generic'
The semantic meaning of the component’s content. When set, the role will be used by assistive technologies to help users navigate the page.
- Anchor to blockAlignmentblockAlignmentblockAlignmentMainAxisAlignmentMainAxisAlignmentDefault: 'start'Default: 'start'
The alignment of children along the block (vertical) axis within the stack. Use this to control how children are vertically distributed in a vertical stack layout.
- Anchor to blockGapblockGapblockGapSpacingKeyword | booleanSpacingKeyword | boolean
The spacing between children along the block axis (top-to-bottom in horizontal writing modes). This is an alias for
. When set totrue, applies a default block gap appropriate for the component.- Anchor to blockSizeblockSizeblockSizenumber | `${number}%`number | `${number}%`
The block size (height in horizontal writing modes) of the element.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's block size.
Learn more about the block-size property.
- Anchor to gapgapgapMaybeTwoBoxEdgesShorthandProperty<SpacingKeyword | boolean>MaybeTwoBoxEdgesShorthandProperty<SpacingKeyword | boolean>
The spacing between children in both axes. Accepts a single value for uniform spacing, or two values separated by a space for independent block-axis and inline-axis spacing (such as
"base small"). When set totrue, applies a default gap appropriate for the component.Learn more about the gap property.
- Anchor to idididstringstring
A unique identifier for the element.
- Anchor to inlineAlignmentinlineAlignmentinlineAlignmentCrossAxisAlignmentCrossAxisAlignmentDefault: 'start'Default: 'start'
The alignment of children along the inline (horizontal) axis within the stack. Use this to control how children are horizontally aligned in a vertical stack layout.
- Anchor to inlineSizeinlineSizeinlineSizenumber | `${number}%`number | `${number}%`
The inline size (width in horizontal writing modes) of the element.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's inline size.
Learn more about the inline-size property.
- Anchor to maxBlockSizemaxBlockSizemaxBlockSizenumber | `${number}%`number | `${number}%`
The maximum block size (maximum height in horizontal writing modes). The element won't grow taller than this value even if its content is longer.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's block size.
Learn more about the max-block-size property.
- Anchor to maxInlineSizemaxInlineSizemaxInlineSizenumber | `${number}%`number | `${number}%`
The maximum inline size (maximum width in horizontal writing modes). The element won't grow wider than this value.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's inline size.
Learn more about the max-inline-size property.
- Anchor to minBlockSizeminBlockSizeminBlockSizenumber | `${number}%`number | `${number}%`
The minimum block size (minimum height in horizontal writing modes). The element won't shrink smaller than this value even if its content is shorter.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's block size.
Learn more about the min-block-size property.
- Anchor to minInlineSizeminInlineSizeminInlineSizenumber | `${number}%`number | `${number}%`
The minimum inline size (minimum width in horizontal writing modes). The element won't shrink narrower than this value.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's inline size.
Learn more about the min-inline-size property.
- Anchor to paddingpaddingpaddingMaybeAllBoxEdgesShorthandProperty<SpacingKeyword | boolean>MaybeAllBoxEdgesShorthandProperty<SpacingKeyword | boolean>
The padding on all edges of the element, using a shorthand syntax. You can specify one to four values following the CSS shorthand convention.
When set to
true, applies a default padding appropriate for the component.- Anchor to paddingBlockpaddingBlockpaddingBlockMaybeTwoBoxEdgesShorthandProperty<SpacingKeyword | boolean>MaybeTwoBoxEdgesShorthandProperty<SpacingKeyword | boolean>
The padding on the block-start and block-end edges. When set to
true, applies a default block padding appropriate for the component.Learn more about the padding-block property.
- Anchor to paddingBlockEndpaddingBlockEndpaddingBlockEndSpacingKeyword | booleanSpacingKeyword | boolean
The padding on the block-end edge (the bottom edge in horizontal writing modes). When set to
true, applies a default padding appropriate for the component.Learn more about the padding-block-end property.
- Anchor to paddingBlockStartpaddingBlockStartpaddingBlockStartSpacingKeyword | booleanSpacingKeyword | boolean
The padding on the block-start edge (the top edge in horizontal writing modes). When set to
true, applies a default padding appropriate for the component.Learn more about the padding-block-start property.
- Anchor to paddingInlinepaddingInlinepaddingInlineMaybeTwoBoxEdgesShorthandProperty<SpacingKeyword | boolean>MaybeTwoBoxEdgesShorthandProperty<SpacingKeyword | boolean>
The padding on the inline-start and inline-end edges. When set to
true, applies a default inline padding appropriate for the component.Learn more about the padding-inline property.
- Anchor to paddingInlineEndpaddingInlineEndpaddingInlineEndSpacingKeyword | booleanSpacingKeyword | boolean
The padding on the inline-end edge (the right edge in left-to-right writing modes). When set to
true, applies a default padding appropriate for the component.Learn more about the padding-inline-end property.
- Anchor to paddingInlineStartpaddingInlineStartpaddingInlineStartSpacingKeyword | booleanSpacingKeyword | boolean
The padding on the inline-start edge (the left edge in left-to-right writing modes). When set to
true, applies a default padding appropriate for the component.Learn more about the padding-inline-start property.
- Anchor to rowGaprowGaprowGapSpacingKeyword | booleanSpacingKeyword | boolean
The spacing between rows (children stacked along the block axis). When set to
true, applies a default row gap appropriate for the component.Learn more about the row-gap property.
AccessibilityRole
The set of accessibility roles that can be applied to layout components to convey semantic meaning to assistive technologies. Each role maps to a corresponding HTML element or ARIA role in web-based hosts. - `main`: The primary content of the page. - `header`: A header section of the page. - `footer`: A section for copyright information, navigation links, and privacy statements. - `section`: A generic section; should have a heading or accessible label. - `aside`: A supporting section related to the main content. - `navigation`: A major group of navigation links. - `ordered-list`: A list of ordered items. - `list-item`: An item inside a list. - `list-item-separator`: A divider that separates items in a list. - `unordered-list`: A list of unordered items. - `separator`: A divider separating sections of content. - `status`: A live region with advisory information that isn't urgent enough to be an alert. - `alert`: Important, usually time-sensitive information. - `generic`: A nameless container with no semantic meaning on its own.
'main' | 'header' | 'footer' | 'section' | 'aside' | 'navigation' | 'ordered-list' | 'list-item' | 'list-item-separator' | 'unordered-list' | 'separator' | 'status' | 'alert' | 'generic'MainAxisAlignment
Controls how items are distributed along the container's main axis (the primary stacking direction). - `start`: Items are packed toward the start of the main axis. - `center`: Items are centered along the main axis. - `end`: Items are packed toward the end of the main axis. - `space-between`: Items are distributed evenly. The first item is flush with the start edge, the last with the end edge. - `space-around`: Items are distributed evenly with half-size spaces on both ends. - `space-evenly`: Items are distributed so that spacing between any two adjacent items (and edges) is equal. Learn more about the [justify-content](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) property.
'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly'SpacingKeyword
A keyword that maps to a predefined spacing value from the Shopify admin design system. Use these instead of pixel values to ensure consistent spacing throughout the UI. - `none`: No spacing (0px). - `small`: A compact amount of spacing, suitable for tight layouts. - `base`: The default spacing, appropriate for most layouts. - `large`: A generous amount of spacing, used to create visual separation.
'none' | 'small' | 'base' | 'large'MaybeTwoBoxEdgesShorthandProperty
A shorthand type that accepts one or two spacing values, representing the start and end edges of a single axis (block or inline). - One value (such as `base`): Applied to both the start and end edges. - Two values (such as `base none`): The first is applied to the start edge, the second to the end edge.
T | `${T} ${T}`CrossAxisAlignment
Controls how items are aligned along the container's cross axis (perpendicular to the main stacking direction). - `start`: Items are aligned to the start of the container's cross axis. - `center`: Items are centered along the container's cross axis. - `end`: Items are aligned to the end of the container's cross axis. - `baseline`: Items are aligned so their text baselines line up with each other. Learn more about the [align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) property.
'start' | 'center' | 'end' | 'baseline'MaybeAllBoxEdgesShorthandProperty
A shorthand type that accepts one to four spacing values following the CSS box-edge shorthand convention (block-start, inline-end, block-end, inline-start). - One value (such as `base`): Applied to all four edges. - Two values (such as `base none`): The first is applied to block-start and block-end, the second to inline-start and inline-end. - Three values (such as `base none large`): The first is block-start, the second is inline-start and inline-end, the third is block-end. - Four values (such as `base none large small`): Applied to block-start, inline-end, block-end, and inline-start respectively.
T | `${T} ${T}` | `${T} ${T} ${T}` | `${T} ${T} ${T} ${T}`Anchor to ExamplesExamples
Anchor to Stack extension content verticallyStack extension content vertically
Stack a sync status label, two detail lines, and an action button in a vertical column with consistent spacing. This example uses BlockStack with the gap prop to control the vertical rhythm, and includes a secondary Button for viewing the sync log.
Stack extension content vertically
 for viewing the sync log.](https://cdn.shopify.com/shopifycloud/shopify-dev/production/assets/assets/images/templated-apis-screenshots/admin-extensions/2025-07/blockstack-default-BfMALjFX.png)
Stack extension content vertically
React
import {reactExtension, BlockStack, Text, Button} from '@shopify/ui-extensions-react/admin';
function App() {
return (
<BlockStack gap>
<Text fontWeight="bold">Warehouse sync</Text>
<Text>Last synced 10 minutes ago</Text>
<Text>12 variants, 3 locations updated</Text>
<Button variant="secondary" onPress={() => console.log('Viewing sync log')}>
View sync log
</Button>
</BlockStack>
);
}
export default reactExtension(
'admin.product-details.block.render',
() => <App />,
);TS
import {extension, BlockStack, Text, Button} from '@shopify/ui-extensions/admin';
export default extension(
'admin.product-details.block.render',
(root) => {
const stack = root.createComponent(BlockStack, {gap: true});
const title = root.createComponent(Text, {fontWeight: 'bold'}, 'Warehouse sync');
const status = root.createComponent(Text, {}, 'Last synced 10 minutes ago');
const detail = root.createComponent(Text, {}, '12 variants, 3 locations updated');
const action = root.createComponent(
Button,
{variant: 'secondary', onPress: () => console.log('Viewing sync log')},
'View sync log',
);
stack.appendChild(title);
stack.appendChild(status);
stack.appendChild(detail);
stack.appendChild(action);
root.appendChild(stack);
},
);Anchor to Center-align block contentCenter-align block content
Center a status display within the extension using inlineAlignment="center" on the BlockStack. This example centers an InlineStack of Badge indicators, creating a focused status row.
Center-align block content
React
import {reactExtension, BlockStack, Text, Badge, InlineStack} from '@shopify/ui-extensions-react/admin';
function App() {
return (
<BlockStack gap inlineAlignment="center">
<Text fontWeight="bold">Integration status</Text>
<InlineStack gap>
<Badge tone="success">Connected</Badge>
<Badge tone="info">Auto-sync on</Badge>
</InlineStack>
<Text>247 products synced</Text>
</BlockStack>
);
}
export default reactExtension(
'admin.product-details.block.render',
() => <App />,
);TS
import {extension, BlockStack, Text, Badge, InlineStack} from '@shopify/ui-extensions/admin';
export default extension(
'admin.product-details.block.render',
(root) => {
const stack = root.createComponent(BlockStack, {
gap: true,
inlineAlignment: 'center',
});
const title = root.createComponent(Text, {fontWeight: 'bold'}, 'Integration status');
const badges = root.createComponent(InlineStack, {gap: true});
const connectedBadge = root.createComponent(Badge, {tone: 'success'}, 'Connected');
const syncBadge = root.createComponent(Badge, {tone: 'info'}, 'Auto-sync on');
badges.appendChild(connectedBadge);
badges.appendChild(syncBadge);
const count = root.createComponent(Text, {}, '247 products synced');
stack.appendChild(title);
stack.appendChild(badges);
stack.appendChild(count);
root.appendChild(stack);
},
);Anchor to Add padding between sectionsAdd padding between sections
Separate compliance sections with spacing and a divider inside a block layout. This example applies padding and paddingBlock on nested BlockStack components, separated by a Divider.
Add padding between sections
React
import {reactExtension, BlockStack, Text, Heading, Divider} from '@shopify/ui-extensions-react/admin';
function App() {
return (
<BlockStack gap padding="base">
<Heading>Product compliance</Heading>
<BlockStack gap paddingBlock="base">
<Text fontWeight="bold">Safety rating</Text>
<Text>UL Listed — Class II</Text>
</BlockStack>
<Divider />
<BlockStack gap paddingBlock="base">
<Text fontWeight="bold">Certifications</Text>
<Text>CE, FCC, RoHS compliant</Text>
</BlockStack>
</BlockStack>
);
}
export default reactExtension(
'admin.product-details.block.render',
() => <App />,
);TS
import {extension, BlockStack, Text, Heading, Divider} from '@shopify/ui-extensions/admin';
export default extension(
'admin.product-details.block.render',
(root) => {
const outer = root.createComponent(BlockStack, {
gap: true,
padding: 'base',
});
const heading = root.createComponent(Heading, {}, 'Product compliance');
const section1 = root.createComponent(BlockStack, {
gap: true,
paddingBlock: 'base',
});
const label1 = root.createComponent(Text, {fontWeight: 'bold'}, 'Safety rating');
const value1 = root.createComponent(Text, {}, 'UL Listed — Class II');
section1.appendChild(label1);
section1.appendChild(value1);
const divider = root.createComponent(Divider);
const section2 = root.createComponent(BlockStack, {
gap: true,
paddingBlock: 'base',
});
const label2 = root.createComponent(Text, {fontWeight: 'bold'}, 'Certifications');
const value2 = root.createComponent(Text, {}, 'CE, FCC, RoHS compliant');
section2.appendChild(label2);
section2.appendChild(value2);
outer.appendChild(heading);
outer.appendChild(section1);
outer.appendChild(divider);
outer.appendChild(section2);
root.appendChild(outer);
},
);Anchor to Best practicesBest practices
- Combine with InlineStack for complex layouts: Use BlockStack for vertical arrangement and nest InlineStack components inside it for horizontal rows, creating grid-like layouts.