---
title: Migrate List from Polaris React
description: Learn how to migrate Polaris React List to Polaris web components.
source_url:
  html: 'https://shopify.dev/docs/apps/build/app-home/migrate-from-polaris-react/list'
  md: >-
    https://shopify.dev/docs/apps/build/app-home/migrate-from-polaris-react/list.md
api_name: app-home
---

# Migrate List from Polaris React

Use an ordered list when sequence matters and an unordered list otherwise. Preserve native list structure rather than simulating bullets with text.

***

## Choose the destination

| Polaris React | Polaris web components | Migration type |
| - | - | - |
| `List` | [`s-ordered-list`](https://shopify.dev/docs/api/app-home/web-components/layout-and-structure/ordered-list) or [`s-unordered-list`](https://shopify.dev/docs/api/app-home/web-components/layout-and-structure/unordered-list) | Direct |

***

## Map list properties

| Polaris React | Polaris web components | Migration notes |
| - | - | - |
| `type="bullet"` | `s-unordered-list` | Use when item order doesn't change the meaning. |
| `type="number"` | `s-ordered-list` | Use for steps or ranked content where order matters. |
| `List.Item` | `s-list-item` | Keep one logical item in each child and don't replace list semantics with a stack. |

***

## Migrate the call site

1. Inventory every `List` call site and record the content, state, events, and accessibility behavior it uses.

2. Open the linked Polaris web component reference and map only documented properties, slots, and events.

3. Move unsupported responsibilities into adjacent content or app state instead of passing old props through.

4. After verification, remove the `List` import and any Polaris-only state, wrappers, or helpers that no longer have a caller.

***

## Preserve these behaviors

* Accessible names, semantics, and keyboard behavior.
* Visible content plus disabled, loading, selected, or error state that affects the task.
* Click, change, submit, and navigation behavior used by app logic.

***

## Test and remove Polaris React

Test every migrated `List` state used by the app. For interactive destinations, verify keyboard operation, focus, and accessible naming. For content destinations, verify document structure and alternative text where applicable. Compare behavior rather than pixel-for-pixel styling.

Don't remove `@shopify/polaris` while another component still imports it. Once all call sites are migrated, remove the package and its provider-level setup, then run the app's full test suite.

***

## Migration example

## Migrating List

##### Polaris web components

```tsx
export function ListMigrationExample() {
  return (
    <><s-unordered-list><s-list-item>Snowboard</s-list-item><s-list-item>Gift card</s-list-item></s-unordered-list></>
  );
}
```

##### Polaris React

```tsx
import {List} from '@shopify/polaris';


export function ListMigrationExample() {

  return (
    <List type="bullet"><List.Item>Snowboard</List.Item><List.Item>Gift card</List.Item></List>
  );
}
```

***
