Skip to main content

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 patternNew componentMigration 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.

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.

Note

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 iconNew 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

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>
);
}
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>;
}

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

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>
);
}
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>
);
}

<s-clickable-chip> introduces the following new properties that weren't available on Tag:

New propTypeDescription
removablebooleanShows a remove control. Fires the remove event when clicked.
hrefstringMakes the chip navigate to a URL when activated.
disabledbooleanDisables the chip and prevents interaction.
hiddenbooleanHides the chip. Fires the afterhide event after the hide animation completes.
onClickfunctionFires when the chip is activated.

Was this page helpful?