# Migrating from deprecated APIs

Learn how to migrate away from recently deprecated APIs before they become breaking changes.

## Why you should migrate Features become deprecated over time as maintainers make improvements to the APIs. Migrating to these improved APIs results in a better developer experience, so it's in your best interest to stay up to date. Deprecated APIs often become breaking changes in subsequent major versions, so the sooner you migrate, the smoother the next major update will be. ## Migrating Material UI provides the `deprecations/all` codemod to help you stay up to date with minimal effort. ```bash npx @mui/codemod@latest deprecations/all ``` This command runs all the current [deprecations codemods](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#deprecations), automatically migrating to the updated API. You can run this codemod as often as necessary to keep up with the latest changes. :::info If you need to manually migrate from a deprecated API, you can find examples below for all deprecations that have been added in Material UI v5. If you need to run a specific codemod, those are also linked below. ::: ## Package-wide deprecated APIs ### Inner element overrides The `slots` and `slotProps` APIs are in the process of being standardized. The analogous APIs—`components`, `componentsProps`, `Component`, and `Props`—are going to be deprecated and eventually removed. This improves the developer experience through consistency, predictability, and reduced cognitive load. ### Composed CSS classes The composed CSS classes are going to be deprecated and eventually removed in favor of atomic class alternatives. For example, the `.MuiAccordionSummary-contentGutters` class was deprecated in favor of the `.MuiAccordionSummary-gutters` and `.MuiAccordionSummary-content` classes. This improves the developer experience by reducing bloat and cognitive load. ### System props MUI System props (such as `mt={*}`, `bgcolor={*}`, and more) have been deprecated in the Box, Typography, Link, Grid, and Stack components. Use the codemod below to move all System props to the `sx` prop: ```bash npx @mui/codemod@latest v6.0.0/system-props ``` You can also manually update your components as shown in the snippet below: ```diff -