--- title: Migrate TextBlock to the Polaris paragraph component description: >- Learn how to migrate the TextBlock component to Polaris web components in checkout and customer account UI extensions. source_url: html: >- https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/text-block md: >- https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/text-block.md --- # Migrate TextBlock to the Polaris paragraph component The Polaris paragraph component renders block-level text content. It replaces the previous [`TextBlock`](https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/ui-components/typography-and-content/textblock) component and is available as [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/paragraph) in API versions 2025-10 and newer. *** ## Updated properties The following properties are different in the Polaris paragraph component. ### inline​Alignment The previous `TextBlock` `inlineAlignment` prop is now called [`textAlign`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/paragraph#properties-propertydetail-textalign). The accepted values are unchanged. | Previous value | New value | | - | - | | `inlineAlignment="start"` | `textAlign="start"` | | `inlineAlignment="center"` | `textAlign="center"` | | `inlineAlignment="end"` | `textAlign="end"` | ## Migrating inlineAlignment to textAlign ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Total: $99.99 ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, TextBlock, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( Total: $99.99 ); } ``` ### size The previous `TextBlock` `size` prop is now called [`type`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/paragraph#properties-propertydetail-type). | Previous value | New value | Migration notes | | - | - | - | | `'base'` | `'paragraph'` | Default type, can be omitted. | | `'small'` | `'small'` | Use `type="small"`. | ## Migrating size to type ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Fine print or disclaimer text ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, TextBlock, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( Fine print or disclaimer text ); } ``` *** ## Removed properties ### appearance The Polaris paragraph component no longer supports `appearance`. Use [`color`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/paragraph#properties-propertydetail-color) and [`tone`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/paragraph#properties-propertydetail-tone) instead. | Previous value | New pattern | Migration notes | | - | - | - | | `'subdued'` | `color="subdued"` | Use `color` prop. | | `'info'` | `tone="info"` | Use `tone` prop. | | `'success'` | `tone="success"` | Use `tone` prop. | | `'warning'` | `tone="warning"` | Use `tone` prop. | | `'critical'` | `tone="critical"` | Use `tone` prop. | | `'decorative'` | `tone="custom"` | Use `tone="custom"`. | | `'accent'` | Removed | Interactive elements like [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link) are styled with the accent treatment automatically. | ## Migrating appearance to color and tone ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( <> Secondary information Your order was successful ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, TextBlock, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( <> Secondary information Your order was successful ); } ``` ### emphasis The Polaris paragraph component no longer supports `emphasis` directly. Wrap content in [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/text) with the appropriate `type` to apply emphasis. | Previous value | New pattern | | - | - | | `emphasis="bold"` | Wrap in `` | | `emphasis="italic"` | Wrap in `` | ## Migrating emphasis ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Important information ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, TextBlock, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( Important information ); } ``` *** ## New properties The Polaris paragraph component introduces the following new properties: | New prop | Type | Description | | - | - | - | | [`color`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/paragraph#properties-propertydetail-color) | `'subdued'` \| `'base'` | Text color. | | [`tone`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/paragraph#properties-propertydetail-tone) | `'auto'` \| `'info'` \| `'success'` \| `'warning'` \| `'critical'` \| `'custom'` | Semantic tone. | | [`accessibilityVisibility`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/paragraph#properties-propertydetail-accessibilityvisibility) | `'visible'` \| `'hidden'` \| `'exclusive'` | Controls visibility for assistive technologies. | | [`dir`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/paragraph#properties-propertydetail-dir) | `'ltr'` \| `'rtl'` \| `'auto'` | Text direction. | | [`lang`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/paragraph#properties-propertydetail-lang) | `string` | Language of the content. | ***