--- title: Migrate to the Polaris choice component description: >- Learn how to migrate the Choice 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/choice md: >- https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/choice.md --- # Migrate to the Polaris choice component The Polaris choice component renders a single selectable option inside a choice list. It replaces the previous [`Choice`](https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/components/forms/choice) component and is available as [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/forms/choice-list#choice) in API versions 2025-10 and newer. `` must always be used inside an [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/forms/choice-list) parent. *** ## Updated properties The following properties are different in the Polaris choice component. ### primary​Content, secondary​Content, and details The previous `Choice` component used the `primaryContent`, `secondaryContent`, and `details` props to render content inside each choice. The Polaris choice component expresses these as children and slots. | Previous prop | New pattern | | - | - | | `primaryContent` | `slot="details"` on the child element. | | `secondaryContent` | `slot="secondary-content"` on the child element. | | `details` | `slot="selected-content"` on the child element. | These props are ignored on the default `Choice` `variant="base"`, so the previous code must use `variant="group"` for them to render. In the Polaris version, set `variant="block"` on the parent `` to get the equivalent layout. ## Migrating content props ##### Latest (Preact) ```tsx import "@shopify/ui-extensions/preact"; import { render } from "preact"; export default function extension() { render(, document.body); } function Extension() { return ( Express shipping Express shipping $15.00 Tracking included ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, ChoiceList, Choice, } from "@shopify/ui-extensions-react/checkout"; export default reactExtension("purchase.checkout.block.render", () => ( )); function Extension() { return ( Express shipping ); } ``` *** ## New properties The Polaris choice component introduces the following new properties: | New prop | Type | Description | | - | - | - | | [`value`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/forms/choice-list#choice-propertydetail-value) | `string` | Sets the value submitted with the form when the choice is selected. | | [`selected`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/forms/choice-list#choice-propertydetail-selected) | `boolean` | Sets the choice's selected state for controlled usage. | | [`defaultSelected`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/forms/choice-list#choice-propertydetail-defaultselected) | `boolean` | Sets the initial selected state for uncontrolled usage. | | [`error`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/forms/choice-list#choice-propertydetail-error) | `boolean` | Associates the choice with the error passed to the parent ``. | *** ## New slots The Polaris choice component introduces a new slot for always-visible helper text alongside the choice. | New slot | Description | | - | - | | `details` | Always-visible helper text for the choice. | *** ## Removed properties ### tertiary​Content The previous `Choice` `tertiaryContent` prop is no longer supported. Use the `details` slot for additional content, or restructure the layout to use the other available slots. ***