--- title: Migrate ResourceItem to the Polaris section component description: >- Learn how to migrate the ResourceItem 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/resource-item md: >- https://shopify.dev/docs/apps/build/customer-accounts/migrate-to-web-components/resource-item.md --- # Migrate ResourceItem to the Polaris section component The Polaris section component groups related content inside a bordered container with an optional heading and action slots. It replaces the previous [`ResourceItem`](https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07/components/actions/resourceitem) 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 ResourceItem 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 ( Placed on April 12, 2026 Buy again View details ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Button, ResourceItem, Text, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.profile.block.render', () => , ); function Extension() { return ( } > Order #1001 Placed on April 12, 2026 ); } ``` *** ## Updated properties The following properties are different in the Polaris section component. ### action The previous `ResourceItem` `action` prop accepted a fragment of `Button` components that were rendered alongside the item's content. On the Polaris section, use the [`primary-action`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/section#slots-propertydetail-primary-action) and [`secondary-actions`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/section#slots-propertydetail-secondary-actions) slots instead. Assign a single button to `primary-action` and one or more buttons to `secondary-actions` using the `slot` attribute. ## Migrating action to slots ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Placed on April 12, 2026 Buy again Track shipment Return ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Button, ResourceItem, Text, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.profile.block.render', () => , ); function Extension() { return ( } > Order #1001 Placed on April 12, 2026 ); } ``` *** ## Button changes in action slots Buttons placed in the `primary-action` and `secondary-actions` slots use the updated [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/button) API. The following properties are different from the previous `Button` used inside `action`. ### kind The previous `Button` `kind` prop is now [`variant`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/button#properties-propertydetail-variant). Use the following mapping: | Previous `kind` | New `variant` | | - | - | | `'primary'` | `'primary'` | | `'secondary'` | `'secondary'` | | `'plain'` | Removed. | ### on​Press The previous `Button` `onPress` prop is now called [`onClick`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/button#events-propertydetail-click). ### to The previous `Button` `to` prop is now called [`href`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/button#properties-propertydetail-href). ### overlay The previous `Button` `overlay` prop has been removed. To open a modal from a button in the `primary-action` or `secondary-actions` slot, use [`command`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/button#properties-propertydetail-command) and [`commandFor`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/button#properties-propertydetail-commandfor) to target a sibling modal by ID. ## Migrating overlay to command ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( <> Placed on April 12, 2026 View details Your order ships in 2 to 4 business days. ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Button, Modal, ResourceItem, Text, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.profile.block.render', () => , ); function Extension() { return ( Your order ships in 2 to 4 business days. } > View details } > Order #1001 Placed on April 12, 2026 ); } ``` ### loading​Label The previous `Button` `loadingLabel` prop has been removed. *** ## New properties The Polaris section component introduces the following new properties: | New prop | Type | Description | | - | - | - | | [`heading`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/section#properties-propertydetail-heading) | `string` | Sets the section's visible heading. | | [`id`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/section#properties-propertydetail-id) | `string` | A unique identifier for the section. | *** ## Removed properties ### on​Press and to The previous `ResourceItem` `onPress` and `to` props made the whole item interactive or turned it into a link. The Polaris section is purely structural and doesn't handle interaction directly. Wrap the content you want to make interactive in [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/clickable): set [`href`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/clickable#properties-propertydetail-href) to replace `to`, or read presses from its [`click`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/clickable#events-propertydetail-click) event to replace `onPress`. Buttons in the `primary-action` and `secondary-actions` slots stay interactive on their own and don't need to be wrapped. ## Migrating onPress and to to s-clickable ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Placed on April 12, 2026 Buy again ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Button, ResourceItem, Text, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.profile.block.render', () => , ); function Extension() { return ( Buy again} > Order #1001 Shipped ); } ``` ### action​Label and action​Accessibility​Label The previous `actionLabel` and `actionAccessibilityLabel` props have been removed. Buttons placed in the `primary-action` and `secondary-actions` slots carry their own label and [`accessibilityLabel`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/button#properties-propertydetail-accessibilitylabel). By default, the `secondary-actions` slot renders extra buttons inline when there's room and collapses the rest into a menu at narrower widths, using its own built-in trigger. To set the label on that trigger (the equivalent of the previous `actionLabel`), replace the slot's built-in trigger with your own button that targets an [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/menu) with [`commandFor`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/button#properties-propertydetail-commandfor). Opting in to this pattern turns off the automatic responsive behavior: the actions stay behind the menu at every width instead of rendering inline when there's space. ## Customizing the menu trigger label ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Placed on April 12, 2026 Buy again Manage Track shipment Return ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Button, ResourceItem, Text, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.profile.block.render', () => , ); function Extension() { return ( } > Order #1001 Placed on April 12, 2026 ); } ``` ### loading The previous `loading` prop rendered a loading state on the whole item. The Polaris section doesn't have a loading state. If you need to indicate loading, set [`loading`](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/actions/button#properties-propertydetail-loading) on the button inside `primary-action`, or render a [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/loading-and-feedback/spinner) alongside the content. *** ## Updated patterns ### Matching the previous spacing The default gap between the heading, content, and action buttons is tighter in `` than it was in `ResourceItem`. To approximate the previous spacing, wrap the section's content in [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/stack) with `direction="block"` and `paddingBlock="large"`. Buttons stay in their slots and aren't wrapped. ## Approximating the previous spacing ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Placed on April 12, 2026 Buy again View details ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Button, ResourceItem, Text, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.profile.block.render', () => , ); function Extension() { return ( } > Order #1001 Placed on April 12, 2026 ); } ``` ### Using s-image-group inside s-section When [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/media/image-group) is rendered inside an ``, it always uses a grid layout. The `variant` prop has been removed — the grid layout is implicit inside a section, so drop `variant` from existing usages. Two other props have been removed: * `accessibilityLabel` — describe each image with its own `alt` attribute instead. * `loading` — each `` manages its own loading state automatically. ## Migrating image-group inside a section ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Image, ImageGroup, ResourceItem, Text, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.profile.block.render', () => , ); function Extension() { return ( Wishlist ); } ``` ### Recreating the inline-stack image group layout The grid layout is the preferred way to display multiple images inside a section. If you need the overlapping inline-stack look from the previous `ImageGroup`, you can recreate it with an [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/grid) that uses overlapping column widths: ## Recreating inline-stack with s-grid ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( +3 ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Image, ImageGroup, ResourceItem, Text, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.profile.block.render', () => , ); function Extension() { return ( Wishlist ); } ``` ***