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.
TextBlock
The text block component renders a block of text that occupies the full width available, similar to a paragraph. Use text block for multi-line content like descriptions, policies, or explanatory copy.
For inline text styling within a sentence, use Text.
Supported targets
- Customer
Account::Kitchen Sink - customer-account.
footer. render-after - customer-account.
order-index. announcement. render - customer-account.
order-index. block. render - customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. action. menu-item. render - customer-account.
order. action. render - customer-account.
order. page. render - customer-account.
page. render - customer-account.
profile. addresses. render-after - customer-account.
profile. announcement. render - customer-account.
profile. block. render - customer-account.
profile. company-details. render-after - customer-account.
profile. company-location-addresses. render-after - customer-account.
profile. company-location-payment. render-after - customer-account.
profile. company-location-staff. render-after - customer-account.
profile. payment. render-after
Supported targets
- Customer
Account::Kitchen Sink - customer-account.
footer. render-after - customer-account.
order-index. announcement. render - customer-account.
order-index. block. render - customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. action. menu-item. render - customer-account.
order. action. render - customer-account.
order. page. render - customer-account.
page. render - customer-account.
profile. addresses. render-after - customer-account.
profile. announcement. render - customer-account.
profile. block. render - customer-account.
profile. company-details. render-after - customer-account.
profile. company-location-addresses. render-after - customer-account.
profile. company-location-payment. render-after - customer-account.
profile. company-location-staff. render-after - customer-account.
profile. payment. render-after
Anchor to PropertiesProperties
Configure the following properties on the TextBlock component.
- Anchor to appearanceappearanceappearance'subdued' | 'accent' | 'decorative' | 'info' | 'success' | 'warning' | 'critical''subdued' | 'accent' | 'decorative' | 'info' | 'success' | 'warning' | 'critical'
Changes the visual appearance of the text block, letting you convey meaning through color.
accent: Conveys emphasis and draws attention to the element.subdued: Conveys a subdued or disabled state.info: Conveys informational content.success: Conveys a successful interaction.warning: Conveys something needs attention or action.critical: Conveys a problem has arisen.decorative: Uses thedecorativecolor set within the theme.
- Anchor to emphasisemphasisemphasisEmphasisEmphasis
Use to emphasize a word or a group of words within the text block. Set to
boldoritalicto apply typographic emphasis that communicates visual hierarchy or stress.italic: Sets the text block in italic. Combine with anofoffsetorstressto add more meaning to the text.bold: Sets the text block in bold. Combine with anofstrongto add more meaning to the text.
- Anchor to idididstringstring
A unique identifier for the component. Use this to target the component in scripts or stylesheets, or to distinguish it from other instances of the same component.
- Anchor to inlineAlignmentinlineAlignmentinlineAlignmentInlineAlignmentInlineAlignment
Aligns the text along the inline axis. Use this to control the horizontal text alignment within the text block.
- Anchor to sizesizesizeTextSizeTextSize
A keyword that sets the size of the text block. Sizes map to the design system's type scale.
: The smallest text size.small: A smaller text size for secondary content.base: The default text size for body content.medium: A slightly larger text size.large: A larger text size for emphasis.: The largest text size.
Emphasis
A keyword that controls typographic emphasis on a text component. Use emphasis to draw attention to a word or group of words within a passage.
'italic' | 'bold'InlineAlignment
Controls how content is aligned along the inline axis (horizontal in standard writing modes). - `'start'`: Aligns content to the inline start of the container. - `'center'`: Centers content along the inline axis. - `'end'`: Aligns content to the inline end of the container.
'start' | 'center' | 'end'TextSize
A keyword that maps to a predefined text size from the design system. Includes all standard `Size` values plus `medium`, which sits between `base` and `large`.
Extract<Size, 'extraSmall' | 'small' | 'base' | 'large' | 'extraLarge'> | 'medium'Size
A keyword that maps to a predefined size from the design system's size scale. Components use a subset of these values depending on which sizes they support. - `extraSmall`: The smallest available size. - `small`: A compact size, smaller than the default. - `base`: The default size, appropriate for most contexts. - `large`: A larger size for increased visual prominence. - `extraLarge`: The largest available keyword size. - `fill`: Stretches to fill the available space in the container.
'extraSmall' | 'small' | 'base' | 'large' | 'extraLarge' | 'fill'Anchor to ExamplesExamples
Anchor to Display a block of textDisplay a block of text
Render a full-width block of text content. This example displays a text block component as a paragraph.Display a block of text

Display a block of text
React
import {
reactExtension,
TextBlock,
BlockStack,
} from '@shopify/ui-extensions-react/customer-account';
export default reactExtension(
'customer-account.page.render',
() => <Extension />,
);
function Extension() {
return (
<BlockStack>
<TextBlock>
We have a 30-day return policy, which
means you have 30 days after receiving
your item to request a return.
</TextBlock>
<TextBlock>
To be eligible for a return, your item
must be in the same condition that you
received it, unworn or unused, with tags,
and in its original packaging. You’ll also
need the receipt or proof of purchase.
</TextBlock>
</BlockStack>
);
}JS
import {
extension,
TextBlock,
BlockStack,
} from '@shopify/ui-extensions/customer-account';
export default extension('customer-account.page.render', (root) => {
const textBlock = root.createComponent(BlockStack, undefined, [
root.createComponent(
TextBlock,
undefined,
'We have a 30-day return policy, which means you have 30 days after receiving your item to request a return.',
),
root.createComponent(
TextBlock,
undefined,
'To be eligible for a return, your item must be in the same condition that you received it, unworn or unused, with tags, and in its original packaging. You’ll also need the receipt or proof of purchase.',
),
]);
root.appendChild(textBlock);
});Anchor to Best practicesBest practices
- Keep paragraphs focused: Limit each text block to a single idea for scannability.
- Use appropriate size: Match the text size to the content hierarchy.
- Use Text for inline styling: For emphasizing words within a text block, nest Text components inside.