--- title: Text description: >- Text is used to visually style and provide semantic value for a small piece of text content. api_version: 2025-07 api_name: checkout-ui-extensions source_url: html: >- https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/components/titles-and-text/text md: >- https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/components/titles-and-text/text.md --- Migrate to Polaris Version 2025-07 is the last API version to support React-based UI components. Later versions use [web components](https://shopify.dev/docs/api/checkout-ui-extensions/latest/polaris-web-components), native UI elements with built-in accessibility, better performance, and consistent styling with [Shopify's design system](https://shopify.dev/docs/apps/design). Check out the [migration guide](https://shopify.dev/docs/api/checkout-ui-extensions/2026-04-rc/upgrading-to-2026-04) to upgrade your extension. # Text Text is used to visually style and provide semantic value for a small piece of text content. ### Support Targets (50) ### 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 ## TextProps * **accessibilityRole** **TextAccessibilityRole** Set the semantic of the component’s content * **accessibilityVisibility** **AccessibilityVisibility** Changes the visibility of the element to assistive technologies. `hidden` hides the component from assistive technology (for example, a screen reader) but remains visually visible. * **appearance** **'subdued' | 'accent' | 'decorative' | 'info' | 'success' | 'warning' | 'critical'** Changes the visual appearance * **emphasis** **Emphasis** Use to emphasize a word or a group of words. * **id** **string** Unique identifier. Typically used as a target for another component’s controls to associate an accessible label with an action. * **size** **TextSize** Size of the text * **visibility** **Visibility** Changes the visibility of the element. `hidden` visually hides the component while keeping it accessible to assistive technology, such as screen readers. Hidden elements don't take any visual space contrary to CSS visibility: hidden; ### TextAccessibilityRole ```ts 'address' | 'deletion' | 'marking' | {type: 'abbreviation'; for?: string} | {type: 'directional-override'; direction: 'ltr' | 'rtl'} | {type: 'datetime'; machineReadable?: string} | 'stress' | 'offset' | 'strong' ``` ### AccessibilityVisibility ```ts 'hidden' ``` ### Emphasis Use to emphasize a word or a group of words. ```ts 'italic' | 'bold' ``` ### TextSize ```ts Extract | 'medium' ``` ### Size ```ts 'extraSmall' | 'small' | 'base' | 'large' | 'extraLarge' | 'fill' ``` ### Visibility ```ts 'hidden' ``` Examples ## Preview ![](https://cdn.shopify.com/shopifycloud/shopify-dev/development/assets/assets/images/api/checkout-extensions/post-purchase/components/text-B_aD71jS.png) ### Examples * #### Basic Text ##### React ```tsx import { reactExtension, Text, BlockStack, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( Total Total Total Total Total Total ); } ``` ##### JS ```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); }); ``` ## Appearance | 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. | ## Best 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 `size` and `subdued`. ## Related [Component - Heading](heading) [Component - HeadingGroup](headinggroup) [Component - TextBlock](textblock)