Skip to content

Commit 63d67a0

Browse files
[blog] Add more content to 'Material UI v7 is here'
1 parent e7728bb commit 63d67a0

File tree

4 files changed

+29
-2
lines changed

4 files changed

+29
-2
lines changed

docs/pages/blog/material-ui-v7-is-here.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,39 @@ It is designed to be straightforward to upgrade to.
1414

1515
## Improved ESM support
1616

17-
The package layout has been updated, and now unambiguously supports both valid ESM and CommonJS through the `exports` field in `package.json`.
18-
This update fixes several issues with popular bundlers like Vite and webpack, and makes it possible to load MUI packages from ES modules under Node.js.
17+
The package layout has been updated, and now unambiguously supports both valid ESM and CommonJS through the `exports` field in `package.json`. The package layout was previously faux-ESM.
18+
19+
This update fixes several issues with popular bundlers like Vite and webpack, and makes it possible to load Material UI packages from ES modules under Node.js.
20+
More details in [mui/material-ui#43938](https://github.com/mui/material-ui/issues/43938).
21+
22+
For example, you can see how all the warnings that [publint.dev](https://publint.dev/) reports with v6 are fixed in v7:
23+
24+
<figure>
25+
<img src="/static/blog/material-ui-v7-is-here/publint-before.png" width="1244" height="880" loading="lazy" alt="" style="width: 400px" />
26+
<figcaption><a href="https://publint.dev/@mui/[email protected]">Before v6</a></figcaption>
27+
</figure>
28+
29+
<figure>
30+
<img src="/static/blog/material-ui-v7-is-here/publint-after.png" width="1260" height="906" loading="lazy" alt="" style="width: 400px" />
31+
<figcaption><a href="https://publint.dev/@mui/[email protected]">After v7</a></figcaption>
32+
</figure>
33+
34+
This new package layout might create breaking changes for some users, especially those depending on private APIs of the library. Refer to the [migration guide](/material-ui/migration/upgrade-to-v7/#package-layout-updated) for more details.
1935

2036
## Completed the slot pattern implementation
2137

2238
The API for replacing or modifying component inner elements is now standardized, and all relevant components use the `slots` and `slotProps` props for greater flexibility and consistency.
39+
For example:
40+
41+
```diff
42+
<Accordion
43+
- TransitionComponent={CustomTransition}
44+
- TransitionProps={{ unmountOnExit: true }}
45+
+ slots={{ transition: CustomTransition }}
46+
+ slotProps={{ transition: { unmountOnExit: true } }}
47+
/>
48+
```
49+
2350
A [guide about this pattern](/material-ui/customization/overriding-component-structure/) has been added to the documentation.
2451

2552
## Opt-in support for CSS layers
Loading
Loading
Loading

0 commit comments

Comments
 (0)