Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bb55033
refactor: align List tokens, spacing and typography with MD3
adam-sajko Aug 7, 2026
b2e7840
fix: propagate theme override and add three-line padding to List
adam-sajko Aug 19, 2026
0be324b
fix: use 16dp trailing inset to match MD3
adam-sajko Aug 19, 2026
6e66e64
fix: use container heights in List and the expand token for the chevron
adam-sajko Aug 28, 2026
ca44392
refactor: restore the List.Accordion colors helper
adam-sajko Aug 28, 2026
162c2f5
fix: align List spacing and container heights with MD3
adam-sajko Sep 1, 2026
c63d10c
chore: forward accessory styles in the List.Item example
adam-sajko Sep 1, 2026
7439898
feat: add selected state to List.Item and List.Accordion
adam-sajko Aug 7, 2026
a3e1bf1
feat: animate List.Accordion expand and collapse
adam-sajko Aug 7, 2026
9e6ce09
feat: add typed leading and trailing slots to List.Item
adam-sajko Aug 7, 2026
2e16b3b
fix: give the List.Item slots their own accessory color
adam-sajko Sep 16, 2026
c41f29e
docs(example): add selected accordion to List.Accordion example
roksanaz Oct 21, 2026
aaa0867
fix(list): move rows below the accordion with its content
jacekAtCK Nov 12, 2026
97d6651
test(list): check the row height with a List.Image thumbnail
jacekAtCK Nov 12, 2026
5d4f1d2
chore(comments): remove unnecessary comments
jacekAtCK Nov 12, 2026
2eec353
fix(list): rebase fix
jacekAtCK Nov 16, 2026
cd9dfe1
Merge branch 'main' into feat/modernize-list-md3
jacekAtCK Nov 16, 2026
98ad0ad
Merge branch 'main' into feat/modernize-list-md3
jacekAtCK Nov 18, 2026
23bde50
Merge branch 'main' into feat/modernize-list-md3
jacekAtCK Nov 18, 2026
6e1aa5f
fix(list): address review comments
jacekAtCK Nov 18, 2026
c3d3ecf
docs(list): mention the selected prop in the migration guide
jacekAtCK Nov 19, 2026
70280c9
Merge branch 'main' into feat/modernize-list-md3
jacekAtCK Nov 23, 2026
f68bc28
fix(list): address review comments
jacekAtCK Nov 23, 2026
66c24a2
Merge branch 'main' into feat/modernize-list-md3
jacekAtCK Nov 25, 2026
7cb7645
fix(list): reset the three line padding when the description goes away
jacekAtCK Nov 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions docs/6.x/docs/guides/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1589,8 +1589,66 @@ The `style` prop of `Card.Cover` is now typed as a `View` style. Image style pro

### List

#### Size and typography

`List.Item` and `List.Accordion` now use the Material Design 3 list sizes and the typography of the theme:

- Rows are 56dp tall with one line, 72dp with two lines and 88dp with three lines.
- A three-line row has 12dp of vertical padding instead of 8dp.
- The space after the trailing element is 16dp instead of 24dp.
- The title uses the `bodyLarge` font of the theme instead of `fontSize` 16. The description uses `bodyMedium` instead of `fontSize` 14.

To keep the 24dp trailing space of 5.x, set it in `style`:

```diff
-<List.Item title="Inbox" />
+<List.Item title="Inbox" style={{ paddingRight: 24 }} />
```

#### `List.Item`

`List.Item` has new `leading` and `trailing` props. They take an element, not a render function, and `List.Icon` in them gets the icon color of the row. The `left` and `right` props of `List.Item` are deprecated and will be removed in 7.0. `List.Accordion` keeps `left` and `right`.

```diff
<List.Item
title="Inbox"
- left={props => <List.Icon {...props} icon="inbox" />}
+ leading={<List.Icon icon="inbox" />}
/>
```

A `List.Item` with `onPress` now has the `button` role, so screen readers announce it as a button. If your tests find elements with `getByRole('button')`, these rows now match too.

Comment thread
jacekAtCK marked this conversation as resolved.
Resolved
`List.Item` and `List.Accordion` have a new `selected` prop. A selected row uses `secondaryContainer` for its background and `onSecondaryContainer` for its title, description and icons. Screen readers announce it as selected. On web, `aria-selected` is not valid on the `button` role, so a row with that role uses `aria-pressed` instead. If you highlighted a row with your own `style` and `titleStyle`, you can use `selected` instead:

```diff
<List.Item
title="Inbox"
- style={{ backgroundColor: theme.colors.secondaryContainer }}
- titleStyle={{ color: theme.colors.onSecondaryContainer }}
+ selected
/>
```

A disabled `List.Item` now looks disabled. In 5.x, `disabled` only stopped presses. The title, description and the icons in `leading` and `trailing` are `onSurface`, and the row content is at 38% opacity. A selected, disabled row has an `onSurface` background at 38% opacity instead of `secondaryContainer`. `List.Accordion` has a new `disabled` prop that works the same way and also stops the accordion from expanding or collapsing.

#### `List.Accordion`

The header keeps its colors when the accordion expands. In 5.x, the title and the `left` icon turned `primary`. The header background is `surface` instead of `background`, and the chevron is `onSurface` instead of `onSurfaceVariant`. The chevron rotates instead of switching to `chevron-up`.

To keep the `primary` title of an expanded accordion, set it in `titleStyle`:

```diff
<List.Accordion
title="Inbox"
expanded={expanded}
onPress={() => setExpanded(!expanded)}
+ titleStyle={expanded ? { color: theme.colors.primary } : undefined}
>
```

The content now animates its height when the accordion expands or collapses. It stays mounted until the collapse animation ends, so it unmounts later than in 5.x.

An accordion with a `left` element now indents only its `List.Item` children. Anything else you put inside keeps its own padding, so indent it yourself to line it up with the items.

```tsx
Expand All @@ -1611,6 +1669,10 @@ An accordion with a `left` element now indents only its `List.Item` children. An

`theme` set on `List.Accordion` no longer reaches its children either. Pass it to the child that needs the override.

#### `List.Image`

`List.Image` with `variant="video"` now has a vertical margin, so a row with a video thumbnail is 88dp tall for one, two or three lines.

### IconButton

`IconButton` now follows the Material 3 Expressive spec. The color modes, size API, and toggle `selected` behavior have changed. Passing the old numeric `size` (for example `size={24}`) crashes at runtime, because `size` is now a named token and `IconButtonTokens.sizes[24]` is `undefined`.
Expand Down
11 changes: 9 additions & 2 deletions example/src/Examples/ListAccordionExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ const ListAccordionExample = () => {
>
<List.Item title="List item 1" />
</List.Accordion>
<List.Accordion
left={(props) => <List.Icon {...props} icon="folder" />}
title="Selected"
selected
>
<List.Item title="List item 1" />
</List.Accordion>
</List.Section>
<Divider />
<List.Section title="Expandable & multiline list item">
Expand All @@ -47,11 +54,11 @@ const ListAccordionExample = () => {
title="Accordion item 1"
>
<List.Item
left={(props) => <List.Icon {...props} icon="thumb-up" />}
leading={<List.Icon icon="thumb-up" />}
title="List item 1"
/>
<List.Item
left={(props) => <List.Icon {...props} icon="thumb-down" />}
leading={<List.Icon icon="thumb-down" />}
title="List item 2"
/>
</List.Accordion>
Expand Down
Loading
Loading