Skip to content

Commit

Permalink
Add section to upgrade guide
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai committed Feb 6, 2025
1 parent 6ae4ab9 commit 95c948d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/data/material/migration/upgrade-to-v7/upgrade-to-v7.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,39 @@ The steps you need to take to migrate from Material UI v6 to v7 are described
This list is a work in progress.
Expect updates as new breaking changes are introduced.
:::

### Lab components moved to the main package

The following `@mui/lab` components have been moved to the main package:

- Alert
- AlertTitle
- Autocomplete
- AvatarGroup
- Pagination
- PaginationItem
- Rating
- Skeleton
- SpeedDial
- SpeedDialAction
- SpeedDialIcon
- ToggleButton
- ToggleButtonGroup

To keep using these components, import them from `@mui/material` instead of `@mui/lab`.

```diff
-import Alert from '@mui/lab/Alert';
+import Alert from '@mui/material/Alert';

-import { Alert } from '@mui/lab';
+import { Alert } from '@mui/material';
```

Use this codemod to automatically update the imports:

<!-- #npm-tag-reference -->

```bash
npx @mui/codemod@next v7.0.0/lab-removed-components <path/to/folder>
```

0 comments on commit 95c948d

Please sign in to comment.