Skip to content

[ListItem, ListItemText] Remove deprecated props#48042

Merged
siriwatknp merged 34 commits intomui:masterfrom
siriwatknp:remove-deprecated-list-props
Mar 23, 2026
Merged

[ListItem, ListItemText] Remove deprecated props#48042
siriwatknp merged 34 commits intomui:masterfrom
siriwatknp:remove-deprecated-list-props

Conversation

@siriwatknp
Copy link
Copy Markdown
Member

@siriwatknp siriwatknp commented Mar 20, 2026

Summary

Remove deprecated props from ListItem and ListItemText components. Remove the @deprecated annotation from ListItemSecondaryAction (the component remains public).

Breaking changes

ListItem:

  • components — use slots instead
  • componentsProps — use slotProps instead
  • ContainerComponent — use component or slots.root instead
  • ContainerProps — use slotProps.root instead
  • The v4 pattern of using ListItemSecondaryAction as a child is no longer supported. Use the secondaryAction prop instead.
  • The container CSS class has been removed (was only used by the v4 child pattern).

ListItemText:

  • primaryTypographyProps — use slotProps.primary instead
  • secondaryTypographyProps — use slotProps.secondary instead

Migration

npx @mui/codemod@latest deprecations/list-item-props <path>
npx @mui/codemod@latest deprecations/list-item-text-props <path>

Note to reviewers

I decided not to remove the ListItemSecondaryAction component (there was a comment to remove it but I believe that it was there before slots/slotProps were introduced).
To reduce the breaking changes surface, I don't see good reason to remove it because this customization is possible:

<ListItem secondaryAction={<button>} slots={{ secondaryAction: ListItemSecondaryAction }}>

@siriwatknp siriwatknp added breaking change Introduces changes that are not backward compatible. package: material-ui Specific to Material UI. labels Mar 20, 2026
@mui-bot
Copy link
Copy Markdown

mui-bot commented Mar 20, 2026

Netlify deploy preview

Bundle size report

Bundle Parsed size Gzip size
@mui/material ▼-730B(-0.14%) ▼-331B(-0.23%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 60bab7d

Comment thread packages/mui-material/src/utils/isMuiElement.test.js Outdated
Comment on lines +72 to +74
fontSize: 20,
fontWeight: 'medium',
letterSpacing: 0,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will need to fix this in a separate PR to replace system props with sx prop

@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 20, 2026
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 20, 2026
Comment thread packages/mui-material/src/ListItem/ListItem.js
Comment thread packages/mui-material/src/ListItem/ListItem.js Outdated
Comment thread docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md
Comment thread packages/mui-material/src/ListItem/ListItem.js
Comment thread packages/mui-material/src/ListItem/ListItem.js Outdated
Comment thread packages/mui-material/src/ListItem/ListItem.js Outdated
@siriwatknp siriwatknp merged commit 611e1ad into mui:master Mar 23, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that are not backward compatible. package: material-ui Specific to Material UI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants