--- title: Migrate Link to the Polaris link component description: >- Learn how to migrate the Link component to Polaris web components in checkout and customer account UI extensions. source_url: html: 'https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/link' md: >- https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/link.md --- # Migrate Link to the Polaris link component The Polaris link component makes text interactive for navigation and link-triggered actions. It replaces the previous [`Link`](https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/ui-components/actions/link) component and is available as [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link) in API versions 2025-10 and newer. *** ## Updated properties The following properties are different in the Polaris link component. ### to The previous `Link` `to` prop is now called [`href`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-href). [`target`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-target) defaults to `'auto'`, which automatically opens **external** links in a new window so customers stay on the current page — no extra code needed. Set `target="_blank"` only when you want to force an **internal** link to open in a new window. ### language The previous `Link` `language` prop is now called [`lang`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-lang). ### appearance The previous `Link` `appearance` prop is now called [`tone`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-tone). | Previous value | New value | Migration notes | | - | - | - | | `'monochrome'` | Removed | `monochrome` is no longer available and doesn't have a direct replacement. | | N/A | `'auto'` | `auto` is a new tone value. The link color is contextualized based on where it's rendered, and it might appear monochrome in subdued text. | | N/A | `'neutral'` | | ## Migrating appearance to tone ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Terms and conditions ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { reactExtension, Link, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( Terms and conditions ); } ``` ### on​Press The previous `Link` `onPress` prop is now called [`onClick`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#events-propertydetail-click). ## Migrating onPress to onClick ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return console.log('Clicked')}>Learn more; } ``` ##### Pre-Polaris (2025-07) ```jsx import { reactExtension, Link, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return console.log('Clicked')}>Learn more; } ``` ### external The previous `Link` `external` prop has been replaced with [`target`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-target). | Previous pattern | New pattern | | - | - | | `external={true}` | [`target`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-target)="\_blank" | | `external={false}` or omitted | [`target`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-target)="auto" or omitted | *** ## New properties The Polaris link component introduces the following new properties: | New prop | Type | Description | | - | - | - | | [`command`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-command) | `'--auto'`, `'--toggle'`, `'--copy'`, `'--show'`, `'--hide'` | Sets the action to run when the link is activated. | | [`commandFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-commandfor) | `string` | Sets the ID of the target component for the command. | | [`interestFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-interestfor) | `string` | Sets the ID of the component that should respond to hover and focus. | | [`target`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-target) | `'_blank'` \| `'auto'` | Controls where the link opens. | *** ## Removed properties ### activate​Action and activate​Target The previous `Link` `activateAction` and `activateTarget` props have been replaced with [`command`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-command) and [`commandFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-commandfor). | Previous pattern | New pattern | Migration notes | | - | - | - | | `activateAction="copy"` + `activateTarget="promo-code"` | [`command`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-command)="--copy" + [`commandFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-commandfor)="promo-code" | Copy behavior now uses the command pattern. | ## Migrating activateAction to command ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( <> Copy promo code ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { ClipboardItem, reactExtension, Link, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( <> Copy promo code ); } ``` ### overlay The Polaris link component no longer supports `overlay` directly. To open a modal overlay, use [`commandFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-commandfor) with [`command`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link#properties-propertydetail-command) and target [`s-modal`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/modal). ## Migrating overlay to commandFor ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( <> View details Your order includes free shipping on all items. ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Link, Modal, Text, reactExtension, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( Your order includes free shipping on all items. } > View details ); } ``` ### toggles The previous `Link` `toggles` prop was used to expand or collapse content in `Disclosure`. In Polaris, use [`s-details`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/details) with [`s-summary`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/details#summary) for expandable content instead of a link trigger. | Previous value | New pattern | | - | - | | `toggles="shipping-details"` | Use [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/details) with [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/details#summary) and place the expandable content inside. | ## Migrating toggles to details ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( View shipping details Ships within 3 to 5 business days. ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { reactExtension, Disclosure, Link, Text, View, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( View shipping details Ships within 3 to 5 business days. ); } ``` ***