--- title: Migrate Pressable to the Polaris clickable component description: >- Learn how to migrate the Clickable (Pressable) 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/pressable md: >- https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/pressable.md --- # Migrate Pressable to the Polaris clickable component The Polaris clickable component wraps content to make it interactive and clickable without the default styling that comes with [`button`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/button) or [`link`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/link). It replaces the previous [``](https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/ui-components/actions/pressable) component and is available as [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable) in API versions 2025-10 and newer. *** ## Updated properties The following properties are different in the Polaris clickable component. ### on​Press The previous `Pressable` `onPress` prop now uses the standard [`click`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#events-propertydetail-click) event handler. ## Migrating \`onPress\` to \`onClick\` ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( console.log('Clicked')}> Click me ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, Pressable, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( console.log('Clicked')}> Click me ); } ``` ### to The previous `Pressable` `to` prop is now called [`href`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#properties-propertydetail-href). [`target`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#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. ### accessibility​Role The previous `Pressable` `accessibilityRole` prop is now called [`type`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#properties-propertydetail-type). Use the same values, such as `button` and `submit`. ### toggles The previous `Pressable` `toggles` prop was used to expand or collapse content in `Disclosure`. In Polaris, use [`command="--toggle"`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#properties-propertydetail-command) with [`commandFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#properties-propertydetail-commandfor) for behavior-only toggling. If you want the disclosure UI (chevron, text treatment, layout), use [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/typography-and-content/details) with `` instead. | Previous value | New pattern | | - | - | | `toggles=""` (behavior only) | Use `command="--toggle"` with `commandFor=""` on `` and target the element you want to show or hide. | | `toggles=""` (with disclosure UI) | Use `` with `` and place the expandable content inside. | ## Migrating toggles to command and commandFor ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( <> Show details Product details ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { Disclosure, Pressable, Text, View, reactExtension, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( Show details Product details ); } ``` ## Migrating toggles to s-details (disclosure UI) ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( Show details Product details ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { Disclosure, Pressable, Text, View, reactExtension, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( Show details Product details ); } ``` ### Sizes The size properties accept updated values in the Polaris clickable component. Previous unitless `number` values map to pixels. For example, `300` is now `'300px'`. | Property | Previous values | New values | Migration notes | | - | - | - | - | | `maxInlineSize` | `number` \| `` `${number}%` `` \| `'fill'` | `` `${number}px` `` \| `` `${number}%` `` \| `'0'` \| `'none'` | `fill` is removed. Use `100%` instead. | | `minInlineSize` | `number` \| `` `${number}%` `` \| `'fill'` | `` `${number}px` `` \| `` `${number}%` `` \| `'0'` | `fill` is removed. Use `100%` instead. | | `maxBlockSize` | `number` \| `` `${number}%` `` \| `'fill'` | `` `${number}px` `` \| `` `${number}%` `` \| `'0'` \| `'none'` | `fill` is removed. Use `100%` instead. | | `minBlockSize` | `number` \| `` `${number}%` `` \| `'fill'` | `` `${number}px` `` \| `` `${number}%` `` \| `'0'` | `fill` is removed. Use `100%` instead. | **Responsive values:** If you used `Style.default().when()` to make this property responsive, container queries replace the `Style` helper. Wrap your content in `` and use `@container` syntax in the property value. Learn more in [Migrate StyleHelper to container queries](https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/style-helper). *** ## Removed properties The following properties aren't supported: * `onPointerDown` * `onPointerEnter` * `onPointerLeave` * `onPointerUp` * `opacity` ### block​Alignment The Polaris clickable component no longer supports `blockAlignment` directly. To align the clickable's children on the cross axis, wrap the children in `stack` and use [`alignItems`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/layout-and-structure/stack#properties-propertydetail-alignitems) on the stack. ## Migrating blockAlignment to alignItems ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( console.log('Delivery details')}> Express shipping Next business day ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, Pressable, Text, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( console.log('Delivery details')} > Express shipping Next business day ); } ``` ### inline​Alignment The Polaris clickable component no longer supports `inlineAlignment` directly. To align the clickable's children on the main axis, wrap the children in `stack` and use [`justifyContent`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/layout-and-structure/stack#properties-propertydetail-justifycontent) on the stack. ## Migrating inlineAlignment to justifyContent ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( console.log('Next step')}> Next step ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, Pressable, Text, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( console.log('Next step')} > Next step ); } ``` ### overlay The Polaris clickable component no longer supports `overlay` directly. E.g. to open a modal, use [`commandFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#properties-propertydetail-commandfor) with [`command`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#properties-propertydetail-command). To close the modal, use `command="--hide"` with `commandFor`. If you need to close the modal programmatically, use [`hideOverlay()`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/modal#methods-propertydetail-hideoverlay). ## Migrating overlay to commandFor ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( <> More info Delivery in 2 to 4 business days. Close ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { Button, Modal, Pressable, Text, reactExtension, useApi, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { const {ui} = useApi(); return ( Delivery in 2 to 4 business days. } > More info ); } ``` *** ## New properties The Polaris clickable component introduces the following new properties: | New prop | Type | Description | | - | - | - | | [`command`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#properties-propertydetail-command) | `'--auto'`, `'--toggle'`, `'--copy'`, `'--show'`, `'--hide'` | Sets the action to run when the clickable is activated. | | [`commandFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#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/clickable#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/clickable#properties-propertydetail-target) | `'auto'`, `'_blank'` | Controls where a linked URL opens. | | [`accessibilityVisibility`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#properties-propertydetail-accessibilityvisibility) | `'visible'`, `'hidden'`, `'exclusive'` | Controls whether the element is visible in the accessibility tree. | | [`lang`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/actions/clickable#properties-propertydetail-lang) | `string` | Sets the language of the element content. | ***