--- title: Migrate to the Polaris sheet component description: >- Learn how to migrate the Sheet 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/sheet' md: >- https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/sheet.md --- # Migrate to the Polaris sheet component The Polaris sheet component displays supplementary content in an overlay panel. It replaces the previous [`Sheet`](https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/ui-components/overlays/sheet) component and is available as [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/sheet) in API versions 2025-10 and newer. *** ## Updated properties The following properties are different in the Polaris sheet component. ### primary​Action and secondary​Action The previous `Sheet` `primaryAction` and `secondaryAction` props have been replaced with the [`primary-action`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/sheet#slots-propertydetail-primaryaction) and [`secondary-actions`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/sheet#slots-propertydetail-secondaryactions) slots. | Previous prop | New pattern | Migration notes | | - | - | - | | `primaryAction` | `slot="primary-action"` | Place button children with `slot="primary-action"`. | | `secondaryAction` | `slot="secondary-actions"` | Note the plural: `secondary-actions`. | ## Migrating action props to slots ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( <> Edit shipping Save Cancel ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, Button, Sheet, TextField, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( Save} secondaryAction={} > ); } ``` *** ## New properties The Polaris sheet component introduces the following new properties: | New prop | Type | Description | | - | - | - | | [`onAfterShow`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/sheet#events-propertydetail-aftershow) | `function` | Fires after the sheet has fully opened and animations have completed. | | [`onAfterHide`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/sheet#events-propertydetail-afterhide) | `function` | Fires after the sheet has fully closed and animations have completed. | *** ## New methods The Polaris sheet component introduces a [`hideOverlay()`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/sheet#methods-propertydetail-hideoverlay) method for programmatically closing the sheet. This replaces the previous pattern of using `useApi()` and `ui.overlay.close()` to close overlays. ## Using hideOverlay to close the sheet ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; import {useRef} from 'preact/hooks'; export default function extension() { render(, document.body); } function Extension() { const sheetRef = useRef(null); function handleSave() { // Save data, then close the sheet sheetRef.current?.hideOverlay(); } return ( <> Edit Save ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, Button, Sheet, TextField, useApi, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { const {ui} = useApi(); function handleSave() { // Save data, then close the sheet ui.overlay.close('edit-sheet'); } return ( Save} > ); } ``` ***