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.
Text
Text is used to visually style and provide semantic value for a small piece of text content.
Supported targets
- Checkout::Actions::Render
Before - Checkout::Cart
Line Details::Render After - Checkout::Cart
Lines::Render After - Checkout::Contact::Render
After - Checkout::Customer
Information::Render After - Checkout::Delivery
Address::Render Before - Checkout::Dynamic::Render
- Checkout::Pickup
Locations::Render After - Checkout::Pickup
Locations::Render Before - Checkout::Pickup
Points::Render After - Checkout::Pickup
Points::Render Before - Checkout::Reductions::Render
After - Checkout::Reductions::Render
Before - Checkout::Shipping
Method Details::Render After - Checkout::Shipping
Method Details::Render Expanded - Checkout::Shipping
Methods::Render After - Checkout::Shipping
Methods::Render Before - Checkout::Thank
You::Cart Line Details::Render After - Checkout::Thank
You::Cart Lines::Render After - Checkout::Thank
You::Customer Information::Render After - Checkout::Thank
You::Dynamic::Render - purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
Supported targets
- Checkout::Actions::Render
Before - Checkout::Cart
Line Details::Render After - Checkout::Cart
Lines::Render After - Checkout::Contact::Render
After - Checkout::Customer
Information::Render After - Checkout::Delivery
Address::Render Before - Checkout::Dynamic::Render
- Checkout::Pickup
Locations::Render After - Checkout::Pickup
Locations::Render Before - Checkout::Pickup
Points::Render After - Checkout::Pickup
Points::Render Before - Checkout::Reductions::Render
After - Checkout::Reductions::Render
Before - Checkout::Shipping
Method Details::Render After - Checkout::Shipping
Method Details::Render Expanded - Checkout::Shipping
Methods::Render After - Checkout::Shipping
Methods::Render Before - Checkout::Thank
You::Cart Line Details::Render After - Checkout::Thank
You::Cart Lines::Render After - Checkout::Thank
You::Customer Information::Render After - Checkout::Thank
You::Dynamic::Render - purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
Anchor to TextPropsText Props
- Anchor to accessibilityRoleaccessibilityRoleaccessibilityRoleTextAccessibilityRoleTextAccessibilityRole
Sets the semantic meaning of the text content for assistive technologies. When set, the role conveys additional context about the text's purpose.
address: Indicates the text is contact information. Typically used for addresses.deletion: Indicates the text has been deleted. Typically used for discounted prices.marking: Indicates the text is marked or highlighted and relevant to the user's current action.stress: Indicates emphatic stress. Typically for words that have a stressed emphasis compared to surrounding text.offset: Indicates an offset from the normal prose of the text. Typically used for a foreign word or fictional character thoughts.strong: Indicates strong importance, seriousness, or urgency.
- Anchor to accessibilityVisibilityaccessibilityVisibilityaccessibilityVisibilityAccessibilityVisibilityAccessibilityVisibility
Controls the visibility of the element to assistive technologies. Set to
'hidden'to hide the element from assistive technologies while keeping it visually visible.- Anchor to appearanceappearanceappearance'subdued' | 'accent' | 'decorative' | 'info' | 'success' | 'warning' | 'critical''subdued' | 'accent' | 'decorative' | 'info' | 'success' | 'warning' | 'critical'
Changes the visual appearance of the text, 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. Set to
boldoritalicto apply typographic emphasis that communicates visual hierarchy or stress.italic: Sets the text in italic. Combine with anofoffsetorstressto add more meaning to the text.bold: Sets the text in bold. Combine with anofstrongto add more meaning to the text.
- Anchor to idididstringstring
A unique identifier for the component. Typically used as a target for another component's controls to associate an accessible label with an action.
- Anchor to sizesizesizeTextSizeTextSize
A keyword that sets the size of the text. 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.
- Anchor to visibilityvisibilityvisibilityVisibilityVisibility
Controls the visual visibility of the element. Set to
'hidden'to visually hide the element while keeping it accessible to assistive technologies.
TextAccessibilityRole
The subset of accessibility roles available to the text component. Each role conveys specific semantic meaning to assistive technologies, helping users understand the purpose and context of the text content.
'address' | 'deletion' | 'marking' | {type: 'abbreviation'; for?: string} | {type: 'directional-override'; direction: 'ltr' | 'rtl'} | {type: 'datetime'; machineReadable?: string} | 'stress' | 'offset' | 'strong'AccessibilityVisibility
Controls the visibility of an element to assistive technologies. - `hidden`: Hides the element from assistive technologies while keeping it visually visible.
'hidden'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'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'Visibility
Controls the visual visibility of an element. - `hidden`: Visually hides the element while keeping it accessible to assistive technologies. The element does not occupy visual space.
'hidden'Anchor to ExamplesExamples
Anchor to Basic TextBasic Text
Basic Text

Basic Text
React
import {
reactExtension,
Text,
BlockStack,
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);
function Extension() {
return (
<BlockStack inlineAlignment="center">
<Text size="extraSmall">Total</Text>
<Text size="small">Total</Text>
<Text size="base">Total</Text>
<Text size="medium">Total</Text>
<Text size="large">Total</Text>
<Text size="extraLarge">Total</Text>
</BlockStack>
);
}JS
import {extension, Text, BlockStack} from '@shopify/ui-extensions/checkout';
export default extension('purchase.checkout.block.render', (root) => {
const text = root.createComponent(BlockStack, undefined, [
root.createComponent(Text, {size: 'extraSmall'}, 'Total'),
root.createComponent(Text, {size: 'small'}, 'Total'),
root.createComponent(Text, {size: 'base'}, 'Total'),
root.createComponent(Text, {size: 'medium'}, 'Total'),
root.createComponent(Text, {size: 'large'}, 'Total'),
root.createComponent(Text, {size: 'extraLarge'}, 'Total'),
]);
root.appendChild(text);
});Anchor to AppearanceAppearance
| Value | Description |
|---|---|
"accent" | Conveys emphasis and draws attention to the element. |
"subdued" | Conveys a subdued or disabled state for the element. |
"info" | Conveys that the element is informative or has information. |
"success" | Convey a successful interaction. |
"warning" | Convey something needs attention or an action needs to be taken. |
"critical" | Conveys a problem has arisen. |
Anchor to Best practicesBest practices
-
Use larger text to emphasize content that’s not a heading, such as a price total.
-
Create contrast between more and less important text with properties such as
sizeandsubdued.