--- title: Migrate Card to the Polaris section component description: >- Learn how to migrate the Card component to Polaris web components in customer account UI extensions. source_url: html: >- https://shopify.dev/docs/apps/build/customer-accounts/migrate-to-web-components/card md: >- https://shopify.dev/docs/apps/build/customer-accounts/migrate-to-web-components/card.md --- # Migrate Card to the Polaris section component The Polaris section component replaces the previous [`Card`](https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07/components/structure/card) component and is available as [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/section) in API versions 2025-10 and newer. ## Migrating Card to s-section ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Addresses Default address Kristin Watson 1655 Island Pkwy Kamloops BC M7G 672 Canada Add ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { BlockStack, Card, Grid, Heading, Icon, InlineLayout, Text, TextBlock, View, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.page.render', () => , ); function Extension() { return ( Addresses Default address Kristin Watson 1655 Island Pkwy Kamloops BC M7G 672 Canada Add ); } ``` *** ## Removed properties ### padding The previous `Card` `padding` prop has been removed. `` applies the padding that's appropriate for the context automatically, based on the merchant's branding. *** ## New properties ### heading `` renders its own heading through the [`heading`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/section#properties-propertydetail-heading) prop. Heading levels adjust automatically based on nesting depth, so the document outline stays correct for assistive technologies. ## Using the heading prop ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Kristin Watson ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Card, Heading, TextBlock, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.page.render', () => , ); function Extension() { return ( Addresses Kristin Watson ); } ``` *** ## Further guidance ### Recreating bordered visual grouping for nested content The previous `Card` rendered a visible border and padded surface regardless of where it was placed, including when nested inside another `Card`. `` applies its surface styling automatically based on context — in customer accounts, that styling is applied only to top-level sections, and nested `` elements render without their own border. If you relied on a nested `Card` to create a bordered visual grouping, recreate it with a layout primitive that exposes `border` and `padding` props, such as [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/stack), [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/grid), or [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/box). ## Recreating a nested bordered group ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Shipping address 1655 Island Pkwy Kamloops BC M7G 672 ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Card, Heading, TextBlock, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.page.render', () => , ); function Extension() { return ( Order summary Shipping address 1655 Island Pkwy Kamloops BC M7G 672 ); } ``` ***