Migrate Tag to Polaris chip components
Polaris chip components display compact labels or categorization markers. They replace the previous Tag component and are available as <s-chip> and <s-clickable-chip> in API versions 2025-10 and newer.
Choose the replacement based on how the Tag is used:
| Previous pattern | New component | Migration notes |
|---|---|---|
Display-only Tag (no onRemove) | <s-chip> | Use for non-interactive labels and categorization markers. |
Tag with onRemove, or that needs to be clickable or navigable | <s-clickable-chip> | Use for removable, clickable, or linkable tags. |
Anchor to Updated propertiesUpdated properties
Anchor to iconicon
The previous Tag icon prop has been replaced with a graphic slot. Place an <s-icon> inside the chip with slot="graphic". Only <s-icon> is supported in this slot.
When you move the icon name to <s-icon type="...">, update it to its Polaris web component equivalent. The chip uses the same icon names as the Polaris icon component.
This table lists only icon values that need more than a camelCase-to-kebab-case rename. If an icon isn't listed here, then convert its previous camelCase name to kebab-case. For example, arrowLeft becomes arrow-left.
This table lists only icon values that need more than a camelCase-to-kebab-case rename. If an icon isn't listed here, then convert its previous camelCase name to kebab-case. For example, arrowLeft becomes arrow-left.
| Previous icon | New icon |
|---|---|
'checkmark' | 'check' |
'close' | 'x' |
'critical' | 'alert-circle' |
'error' | 'x-circle' |
'errorFill' | 'x-circle-filled' |
'gift' | 'gift-card' |
'giftFill' | 'gift-card' |
'hamburger' | 'menu' |
'hollowCircle' | 'circle' |
'horizontalDots' | 'menu-horizontal' |
'infoFill' | 'info-filled' |
'list' | 'list-bulleted' |
'magnify' | 'search' |
'marker' | 'location' |
'orderBox' | 'order' |
'pen' | 'edit' |
'question' | 'question-circle' |
'questionFill' | 'question-circle-filled' |
'starFill' | 'star-filled' |
'success' | 'check-circle' |
'verticalDots' | 'menu-vertical' |
'warning' | 'alert-triangle' |
'warningFill' | 'alert-triangle-filled' |
Migrating icon to the graphic slot
Latest (Preact)
import '@shopify/ui-extensions/preact';
import {render} from 'preact';
export default function extension() {
render(<Extension />, document.body);
}
function Extension() {
return (
<s-chip>
<s-icon slot="graphic" type="discount"></s-icon>
Free shipping
</s-chip>
);
}Pre-Polaris (2025-07)
import {
reactExtension,
Tag,
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);
function Extension() {
return <Tag icon="discount">Free shipping</Tag>;
}Anchor to onRemoveon Remove
The previous Tag onRemove prop is now supported on <s-clickable-chip> only. Set the removable prop to show the remove control, and listen for the remove event. In Preact, you still handle this with the onRemove prop, but the handler now receives an Event instead of being called with no arguments.
Migrating onRemove
Latest (Preact)
import '@shopify/ui-extensions/preact';
import {render} from 'preact';
import {useState} from 'preact/hooks';
export default function extension() {
render(<Extension />, document.body);
}
function Extension() {
const [removed, setRemoved] = useState(false);
if (removed) return null;
return (
<s-clickable-chip
removable
onRemove={() => {
setRemoved(true);
}}
>
<s-icon slot="graphic" type="discount"></s-icon>
SAVE20
</s-clickable-chip>
);
}Pre-Polaris (2025-07)
import {useState} from 'react';
import {
reactExtension,
Tag,
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);
function Extension() {
const [removed, setRemoved] = useState(false);
if (removed) return null;
return (
<Tag
icon="discount"
onRemove={() => {
setRemoved(true);
}}
>
SAVE20
</Tag>
);
}Anchor to New propertiesNew properties
<s-clickable-chip> introduces the following new properties that weren't available on Tag:
| New prop | Type | Description |
|---|---|---|
removable | boolean | Shows a remove control. Fires the remove event when clicked. |
href | string | Makes the chip navigate to a URL when activated. |
disabled | boolean | Disables the chip and prevents interaction. |
hidden | boolean | Hides the chip. Fires the afterhide event after the hide animation completes. |
onClick | function | Fires when the chip is activated. |