Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.
Map
Use the Map component to provide visual representation of geographic data such as verifying address, package or pickup locations.
Please note that the merchant or partner has to provide an API key and a set of allowed domains where the map would render.
The 3 necessary domains needed are:
-
https://*.[MERCHANT-DOMAIN].com -
https://shop.app -
https://shopify.com
Where * is a wildcard. Learn more about match patterns.
Please refer to the Google Maps Platform documentation for more details on how to get an API key.
Supported targets
- Checkout::Actions::Render
Before - Checkout::Cart
Line Details::Render After - Checkout::Cart
Lines::Render After - Checkout::Contact::Render
After - Checkout::Customer
Information::Render After - Checkout::Delivery
Address::Render Before - Checkout::Dynamic::Render
- Checkout::Pickup
Locations::Render After - Checkout::Pickup
Locations::Render Before - Checkout::Pickup
Points::Render After - Checkout::Pickup
Points::Render Before - Checkout::Reductions::Render
After - Checkout::Reductions::Render
Before - Checkout::Shipping
Method Details::Render After - Checkout::Shipping
Method Details::Render Expanded - Checkout::Shipping
Methods::Render After - Checkout::Shipping
Methods::Render Before - Checkout::Thank
You::Cart Line Details::Render After - Checkout::Thank
You::Cart Lines::Render After - Checkout::Thank
You::Customer Information::Render After - Checkout::Thank
You::Dynamic::Render - purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
Supported targets
- Checkout::Actions::Render
Before - Checkout::Cart
Line Details::Render After - Checkout::Cart
Lines::Render After - Checkout::Contact::Render
After - Checkout::Customer
Information::Render After - Checkout::Delivery
Address::Render Before - Checkout::Dynamic::Render
- Checkout::Pickup
Locations::Render After - Checkout::Pickup
Locations::Render Before - Checkout::Pickup
Points::Render After - Checkout::Pickup
Points::Render Before - Checkout::Reductions::Render
After - Checkout::Reductions::Render
Before - Checkout::Shipping
Method Details::Render After - Checkout::Shipping
Method Details::Render Expanded - Checkout::Shipping
Methods::Render After - Checkout::Shipping
Methods::Render Before - Checkout::Thank
You::Cart Line Details::Render After - Checkout::Thank
You::Cart Lines::Render After - Checkout::Thank
You::Customer Information::Render After - Checkout::Thank
You::Dynamic::Render - purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
Anchor to MapPropsMap Props
- Anchor to accessibilityLabelaccessibilityLabelaccessibilityLabelstringstringrequiredrequired
A label that describes the purpose or contents of the map. It will be announced to users using assistive technologies and will provide them with more context.
- Anchor to apiKeyapiKeyapiKeystringstringrequiredrequired
The Google Maps API key used to authenticate requests. You can obtain a key from the Google Maps Platform.
- Anchor to latitudelatitudelatitudenumbernumberrequiredrequired
The latitude of the center of the map, in degrees. Valid values range from -90 (south pole) to 90 (north pole).
- Anchor to longitudelongitudelongitudenumbernumberrequiredrequired
The longitude of the center of the map, in degrees. Valid values range from -180 (west) to 180 (east).
- Anchor to idididstringstring
A unique identifier for the map. Used to set a unique map ID for the Google Maps API. If omitted, the map component automatically generates a unique identifier. If you provide one, you must ensure it is unique across all maps in the extension.
- Anchor to maxBlockSizemaxBlockSizemaxBlockSizeMaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >MaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >
The maximum block size (maximum height in horizontal writing modes). The element won't grow taller than this value even if its content is longer.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's block size.'fill': Takes all the available space.
Learn more about the max-block-size property.
- Anchor to maxInlineSizemaxInlineSizemaxInlineSizeMaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >MaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >
The maximum inline size (maximum width in horizontal writing modes). The element won't grow wider than this value.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's inline size.'fill': Takes all the available space.
Learn more about the max-inline-size property.
- Anchor to maxZoommaxZoommaxZoomnumbernumber
The maximum zoom level the user can zoom in to. Prevents the map from being zoomed in beyond this level.
- Anchor to minBlockSizeminBlockSizeminBlockSizeMaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >MaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >
The minimum block size (minimum height in horizontal writing modes). The element won't shrink smaller than this value even if its content is shorter.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's block size.'fill': Takes all the available space.
Learn more about the min-block-size property.
- Anchor to minInlineSizeminInlineSizeminInlineSizeMaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >MaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >
The minimum inline size (minimum width in horizontal writing modes). The element won't shrink narrower than this value.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's inline size.'fill': Takes all the available space.
Learn more about the min-inline-size property.
- Anchor to minZoomminZoomminZoomnumbernumber
The minimum zoom level the user can zoom out to. Prevents the map from being zoomed out beyond this level.
- Anchor to onBoundsChangeonBoundsChangeonBoundsChange(bounds: MapBounds) => void(bounds: MapBounds) => void
A callback that fires when the visible area of the map changes (for example, after the user pans the map). Receives the new bounding box as a
object withandcorners.- Anchor to onCenterChangeonCenterChangeonCenterChange(location: MapLocation) => void(location: MapLocation) => void
A callback that fires when the center point of the map changes (for example, after the user pans the map). Receives the new center as a
coordinate pair.- Anchor to onDoublePressonDoublePressonDoublePress(location: MapLocation) => void(location: MapLocation) => void
A callback that fires when the user double-presses (double-clicks) the map. Receives the geographic
coordinate pair of the double-press point.- Anchor to onPressonPressonPress(location: MapLocation) => void(location: MapLocation) => void
A callback that fires when the user presses (clicks or taps) the map. Receives the geographic
coordinate pair of the press point.- Anchor to onZoomChangeonZoomChangeonZoomChange(zoom: MapZoom) => void(zoom: MapZoom) => void
A callback that fires when the map's zoom level changes (for example, after the user pinches to zoom or uses the zoom controls). Receives the new zoom level as a
value (1–18).- Anchor to zoomzoomzoomnumbernumber
The initial zoom level of the map. Must be an integer between 0 and 18, where lower values show a wider area and higher values show more detail.
MaybeResponsiveConditionalStyle
A type that represents a value that can be a conditional style. The conditions are based on the viewport size. We highly recommend using the `Style` helper which simplifies the creation of conditional styles.
T | ConditionalStyle<T, ViewportSizeCondition>ConditionalStyle
A conditional style definition that maps one or more conditions to different values. The `default` value is used as a fallback when none of the conditions in `conditionals` are satisfied.
- conditionals
An array of conditional values.
ConditionalValue<T, AcceptedConditions>[] - default
The default value applied when none of the conditional values specified in `conditionals` are met.
T
ConditionalValue
A single conditional branch that pairs a set of conditions with the value to apply when those conditions are met.
- conditions
The conditions that must be met for the value to be applied. At least one condition must be specified.
AcceptedConditions - value
The value that will be applied if the conditions are met.
T
ViewportSizeCondition
A condition that targets layouts based on the inline size (width in horizontal writing modes) of the viewport.
- viewportInlineSize
The minimum viewport inline size that the condition must match.
{ min: T; }
MapBounds
A geographic bounding box defined by its north-east and south-west corners. Used to describe the visible area of the map.
- northEast
The north-east (top-right) corner of the bounding box.
MapLocation - southWest
The south-west (bottom-left) corner of the bounding box.
MapLocation
MapLocation
A geographic coordinate pair representing a point on the map.
- latitude
The latitude of the location, in degrees. Valid values range from -90 (south pole) to 90 (north pole).
number - longitude
The longitude of the location, in degrees. Valid values range from -180 (west) to 180 (east).
number
MapZoom
The zoom level of the map, as an integer between 1 and 18. Lower values show a wider area (such as a whole country), while higher values show a more detailed view (such as a street block).
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18Anchor to ExamplesExamples
Anchor to Basic MapBasic Map
Basic Map

Basic Map
React
import {
reactExtension,
Map,
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);
function Extension() {
return (
<Map
apiKey="YOUR_GOOGLE_MAPS_API_KEY"
latitude={-28.024}
longitude={140.887}
zoom={4}
accessibilityLabel="Map showing pickup locations"
/>
);
}JS
import {extension, Map} from '@shopify/ui-extensions/checkout';
export default extension('purchase.checkout.block.render', (root) => {
const map = root.createComponent(Map, {
apiKey: 'YOUR_API_KEY',
accessibilityLabel: 'Map showing pickup locations',
latitude: -28.024,
longitude: 140.887,
zoom: 4,
});
root.appendChild(map);
});Anchor to Best practicesBest practices
- Use a relevant default view: Set the initial map center and zoom levels to frame the most relevant area for the buyer and ensure that relevant markers are visible without having to pan or zoom.
- Use markers sparingly: Limit the number of markers to avoid cluttering the map. For many locations, consider setting the markers to clusterable or showing a list alongside the map.
- Use distinct markers to illustrate state: If your markers are interactive, make sure the selected marker's icon is visually different from non-selected markers so buyers can identify their selection.
- Provide fallback text: Ensure that address information is also displayed as text for buyers who can't interact with the map or in case the map can't load.
Anchor to LimitationsLimitations
- The map requires a Google Maps API key and a set of allowed domains where the map renders. Refer to the Google Maps Platform documentation for details on obtaining an API key.
- Map rendering depends on the buyer's network connection and Google Maps availability. Offline map rendering isn't supported and the Map component doesn't provide a built-in fallback for offline scenarios.