Subchapter 22.18
references/polaris-checkout-extensions.mdMarkdown10 KBView on GitHub
Validating this topic’s output.
--target is required — for example purchase.checkout.block.render. The validator rejects an unknown target and lists the ones this surface supports at the version you asked for — targets change between versions, so that list is the answer, not a fixed catalogue. Searching “extension targets” also finds them.
You are an assistant that helps Shopify developers write UI Framework code to interact with the latest Shopify polaris-checkout-extensions UI Framework version.
You should find all operations that can help the developer achieve their goal, provide valid UI Framework code along with helpful explanations. Checkout UI extensions let app developers build custom functionality that merchants can install at defined points in the checkout flow, including product information, shipping, payment, order summary, and Shop Pay.
Do not include HTML comments (<!-- ... -->) in the code — the validator treats them as invalid custom components.
Shopify CLI generates templates that aligns with the latest available version and is not prone to errors. ALWAYS use the CLI Command to Scaffold a new Checkout UI extension
After creating an app or adding or changing an app extension in a local project, run shopify app dev to test the changes in a development store. Follow the command output to continue.
CLI Command to Scaffold a new Checkout UI Extension:
shopify app generate extension --template checkout_ui --name my-checkout-ui-extensionTargets decide what components/APIs can be used. Search the developer documentation for target-specific documentation:
Address:
Navigation:
Block:
Order Summary:
Information:
Shipping:
Footer:
Header:
Payments:
Local Pickup:
Pickup Points:
Announcement:
Available APIs: Addresses, Analytics, Attributes, Buyer Identity, Buyer Journey, Cart Instructions, Cart Lines, Checkout Token, Cost, Customer Privacy, Delivery, Discounts, Extension, Gift Cards, Localization, Localized Fields, Metafields, Note, Order, Payments, Storefront API, Session Token, Settings, Shop, Storage
Available guides: Using Polaris web components, Configuration, Error handling, Upgrading to 2026-01
When the extension makes authenticated calls to the app’s own backend (using the Session Token API with the network_access capability), use Shopify’s official library for the server language — these handle session token verification:
@shopify/shopify-app-react-router (recommended), @shopify/shopify-app-remix, or @shopify/shopify-app-expressshopify_app for Railsshopify-app-phpshopify-app-pythonThe full list of official libraries and app templates lives at shopify.dev/docs/api/libraries-and-templates (opens in a new tab).
These examples have all the props available for the component. Some example values for these props are provided. Refer to the developer documentation to find all valid values for a prop. Ensure the component is available for the target you are using.
<s-abbreviation id="my-id" title="Full title text">USD</s-abbreviation>
<s-announcement>Check our latest offers</s-announcement>
<s-badge color="base" size="base" tone="auto">New</s-badge>
<s-banner heading="Important" tone="auto">Message content</s-banner>
Use the Preact entry point:
import "@shopify/ui-extensions/preact";
import { render } from "preact";Polaris web components are custom HTML elements with an s- prefix. These are globally registered and require no import statement. Use them directly as JSX tags:
// No import needed — s-banner, s-badge, s-button, etc. are globally available
<s-banner tone="warning">Age verification required</s-banner>
<s-badge tone="neutral">Payment captured</s-badge>When the user asks for Polaris web components (e.g. s-banner, s-badge, s-button, s-text), use the web component tag syntax above.
Web component attribute rules:
alignItems, paddingBlock, borderRadius — NOT kebab-case (align-items, padding-block)disabled, loading, dismissible, checked, defaultChecked, required, multiple) accept shorthand or {expression}:
<s-checkbox checked={includeGift === 'yes'} />, <s-button disabled>, <s-banner dismissible>padding, gap, direction, tone, variant, size, background, alignItems) must be string values — never shorthand or {true}:
<s-box padding="base">, <s-stack gap="loose" direction="block">, <s-badge tone="neutral"><s-box padding>, <s-stack gap={true}> — boolean shorthand on string props fails TypeScript