--- title: Migrate MapPopover to the Polaris popover component description: >- Learn how to migrate the MapPopover 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/map-popover md: >- https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/map-popover.md --- # Migrate MapPopover to the Polaris popover component The previous [`MapPopover`](https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/ui-components/media-and-visuals/mappopover) component has been replaced by the general-purpose [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/popover) component in API versions 2025-10 and newer. Use `` as a sibling of `` and activate it with the [`command`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#mapmarker-propertydetail-command) and [`commandFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#mapmarker-propertydetail-commandfor) props on the marker. *** ## Updated properties The following properties are different in the Polaris popover component. ### on​Open The previous `MapPopover` `onOpen` prop is now called [`onShow`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/popover#events-propertydetail-show). The handler now receives an `Event` instead of being called with no arguments. ### on​Close The previous `MapPopover` `onClose` prop is now called [`onHide`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/popover#events-propertydetail-hide). The handler now receives an `Event` instead of being called with no arguments. *** ## Updated patterns ### Activation The previous pattern of nesting `MapPopover` inside a `MapMarker` `overlay` prop has been replaced with [`command`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#mapmarker-propertydetail-command) and [`commandFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#mapmarker-propertydetail-commandfor) on the [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#map%20marker) targeting a sibling [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/popover) by ID. | Previous pattern | New pattern | | - | - | | `overlay={}` on `MapMarker` | `command="--toggle"` + `commandFor="popover-id"` on `` pointing to a sibling `` | **Tip:** The `command` prop defaults to `--auto`, which resolves to `--toggle` for popovers. You can omit `command` when targeting a popover and only set `commandFor`. ## Migrating MapPopover to s-popover ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( 620 King Street West, Toronto ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, Map, MapMarker, MapPopover, Text, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( 620 King Street West, Toronto } /> ); } ``` ***