# Upgrade to v6
This guide explains how to upgrade from MUI System v5 to v6.
## Start using the beta release In the `package.json` file, change the package version from `latest` to `next`. ```diff title="package.json" -"@mui/system": "latest", +"@mui/system": "next", ``` Using `next` ensures your project always uses the latest v6 beta release. Alternatively, you can also target and fix it to a specific version, for example, `6.0.0-beta.0`. ## Breaking changes Since v6 is a new major release, it contains some changes that affect the public API. The steps you need to take to migrate from MUI System v5 to v6 are described below. :::info This list is a work in progress. Expect updates as new breaking changes are introduced. ::: ### Root code is now ESM The ESM code, previously under the `esm/` build, has been moved to the root of the package. The CommonJS code, previously on the root, has been moved to the `node/` build. :::info This is an intermediate step to prepare for adding the `exports` field to the `package.json` file. If you have trouble using this new structure, please wait for the future update which adds the `exports` field. You can follow progress on https://github.com/mui/material-ui/issues/30671. ::: ### Grid The `Grid` component was updated and stabilized: - The previous size (`xs`, `sm`, `md`, ...) and offset (`xsOffset`, `smOffset`, `mdOffset`, ...) props, which were named after the theme's breakpoints, were replaced with the `size` and `offset` props. - The spacing mechanism was reworked to use the `gap` CSS property. This brings some breaking changes described in the following sections. #### Stabilized API The `Grid` component API was stabilized, so its import no longer contains the `Unstable_` prefix: ```diff - import { Unstable_Grid as Grid } from '@mui/system'; + import { Grid } from '@mui/system'; ``` ```diff - import Grid from '@mui/system/Unstable_Grid'; + import Grid from '@mui/system/Grid'; ``` #### Size and offset props Previously, the size and offset props were named corresponding to the theme's breakpoints. For the default theme this was: - Size: `xs`, `sm`, `md`, `lg`, `xl` - Offset: `xsOffset`, `smOffset`, `mdOffset`, `lgOffset`, `xlOffset` In v6, these props are renamed to `size` and `offset`: ```diff
This removes the need for the `disableEqualOverflow` prop:
```diff
-
:::warning
Both of these changes might slightly affect your layout.
Note that the items' position doesn't change.
We recommend adopting this new behavior and **not trying to replicate the old one**, as this is a more predictable and modern approach.
:::
### GridProps type
The `cssGrid` function's `GridProps` type has been renamed to `CssGridProps`.
This is to avoid collision with the `GridProps` type corresponding to the `Grid` component props.