Skip to main content

Upgrading to 2025-10

This guide describes how to upgrade your point-of-sale UI extension to API version 2025-10 and adopt Polaris web components.


Set the API version to 2025-10 in shopify.extension.toml to use Polaris web components.

Early access preview

We do not recommend migrating your production point-of-sale UI extension to Polaris yet. However, now is a great time to explore this new version and start thinking about what it means for your own extensions.

Shopify.extension.toml

api_version = "2025-10"

[[extensions]]
name = "your-extension"
handle = "your-extension"
type = "ui_extension"

# Contents of your existing file...

Anchor to adjust-dependenciesAdjust package dependencies

As of 2025-10, Shopify recommends Preact for UI extensions. Update the dependencies in your package.json file and re-install.

New dependencies with Preact

package.json

{
"dependencies": {
"preact": "^10.10.x",
"@shopify/ui-extensions": "~2025.10.0-rc"
}
}

Anchor to make-typescript-adjustmentsMake TypeScript adjustments

These steps make TypeScript aware of the new global shopify object. Skip these steps if your app was not built using TypeScript.

Update your extension config at a path like extensions/{extension-name}/tsconfig.json. You do not need to change your app's root tsconfig.json file.

These commands generate a shopify.d.ts file in your extension directory. This imports UI Extension component types and declares the shopify API object for each extension target.

Update your extension's tsconfig.json

{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact",
"target": "ES2020",
"checkJs": true,
"allowJs": true,
"moduleResolution": "node",
"esModuleInterop": true
}
}

Instead of accessing APIs from a callback parameter, access them from the global shopify object. Here's an example of migrating API calls.

New API calls in Preact

Preact

import '@shopify/ui-extensions/preact';
import {render} from 'preact';

export default function extension() {
render(<Extension />, document.body);
}

function Extension() {
return <s-button onClick={onButtonClick}>Print</s-button>;
}

async function onButtonClick() {
await shopify.print.print('documents/test-print');
console.log('print completed');
}

If you had previously been using React hooks, import those same hooks from a new Preact-specific package. Here's an example of migrating hooks.

New hooks in Preact

Preact

import '@shopify/ui-extensions/preact';
import {render} from 'preact';
import {useState, useEffect} from 'preact/hooks';

export default function extension() {
render(<ConnectivityStatus />, document.body);
}

function ConnectivityStatus() {
const [isConnected, setIsConnected] = useState(
shopify.connectivity.current.value.internetConnected === 'Connected',
);

useEffect(() => {
const unsubscribe = shopify.connectivity.current.subscribe(
(newConnectivity) => {
setIsConnected(newConnectivity.internetConnected === 'Connected');
},
);
return unsubscribe;
}, []);

return (
<s-text tone={isConnected ? 'success' : 'warning'}>
Status: {isConnected ? 'Online' : 'Offline'}
</s-text>
);
}

Anchor to migrate-to-polaris-web-componentsMigrate to Polaris web components

Polaris web components are exposed as custom HTML elements. Update your React or JavaScript components to custom elements.

New components in Preact

Preact

/* eslint-disable react/self-closing-comp */
import '@shopify/ui-extensions/preact';
import {render} from 'preact';

export default function extension() {
render(<Extension />, document.body);
}

function Extension() {
return (
<s-stack direction="inline" gap="base">
<s-text-field label="Gift message"></s-text-field>
<s-button variant="primary">Save</s-button>
</s-stack>
);
}

Anchor to polaris-web-componentsPolaris web components

Early access preview

These web components are an early access preview of the Polaris UI framework. We will add more components over time.

Use the comparison table below to see which Polaris web components are available today, which are coming soon, and how they map to legacy components.

Anchor to mapping-legacy-components-to-polaris-web-componentsMapping legacy components to Polaris web components

Legacy ComponentPolaris Web ComponentMigration Notes
BadgeBadgeAvailable
BannerBannerAvailable
BoxBoxAvailable
ButtonButtonAvailable
CameraScannerCameraScannerComing soon
DateFieldDateFieldAvailable
DatePickerDatePickerAvailable
DatePickerDateSpinnerAvailable, Replaces DatePicker.inputMode="spinner"
DialogModalAvailable
EmailFieldEmailFieldAvailable
HeadingHeadingAvailable
IconIconAvailable, more icons coming soon.
ImageImageAvailable
ListVirtualizedListComing soon
NavigatorRemoved.
NumberFieldNumberFieldAvailable
PinPadComing soon
POSBlockPOSBlockAvailable
POSBlockRowReplaced by POSBlock
POSReceiptBlockReplaced by POSBlock
PrintPreviewDocumentPreviewComing soon
QRCodeQRCodeComing soon
RadioButtonListChoiceListAvailable
ScreenPageAvailable
ScrollViewScrollBoxAvailable
SearchBarSearchFieldAvailable
SectionSectionAvailable
SectionHeaderUse Section.heading
SegmentedControlTabs/TabComing soon
SelectableClickableAvailable
StackStackAvailable
StepperNumberFieldUse NumberField with stepper controls
TextTextAvailable
TextAreaTextAreaAvailable
TextFieldTextFieldAvailable
TileTileAvailable
TimeFieldTimeFieldAvailable
TimePickerTimePickerAvailable