You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data/material/migration/migrating-to-v6/migrating-to-pigment-css.md
+27-24Lines changed: 27 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,9 @@ Before going through this guide, make sure you have [migrated to Material UI v6
6
6
7
7
## Introduction
8
8
9
-
The default styling engine of Material UI v6 is [Emotion](https://emotion.sh/docs/introduction). It lets you write styles in a CSS-in-JS fashion, which is great for dynamic styles that depend on states and props. However, it has some performance drawbacks when it comes to frequent re-renders because the style recalculation happens on the client-side. It also does not fully support [React Server Components](https://react.dev/reference/rsc/server-components), a new rendering paradigm that renders components ahead of time on the server.
9
+
The default styling engine of Material UI v6 is [Emotion](https://emotion.sh/docs/introduction).
10
+
It lets you write styles in a CSS-in-JS fashion, which is great for dynamic styles that depend on states and props. However, it has some performance drawbacks when it comes to frequent re-renders because the style recalculation happens on the client-side.
11
+
It also does not fully support [React Server Components](https://react.dev/reference/rsc/server-components), a new rendering paradigm that renders components ahead of time on the server.
10
12
11
13
Pigment CSS aims to solve these problems while keeping the same developer experience of writing styles in a CSS-in-JS fashion.
12
14
It can work alongside Emotion to ease the migration process, but it is recommended to fully migrate to Pigment CSS in the end.
@@ -15,7 +17,7 @@ It can work alongside Emotion to ease the migration process, but it is recommend
15
17
16
18
Pigment CSS can be used with one of the following frameworks:
17
19
18
-
-[Next.js App Router](https://nextjs.org/docs/app) with Webpack 5 (Turbo is not supported yet)
20
+
-[Next.js App Router](https://nextjs.org/docs/app) with Webpack v5 (Turbopack is not supported yet)
19
21
-[Vite](https://vitejs.dev/)
20
22
21
23
## Installation
@@ -102,7 +104,7 @@ Finally, import the stylesheet at the top of the layout file.
102
104
import type { Metadata } from 'next';
103
105
import { Inter } from 'next/font/google';
104
106
105
-
+import '@mui/material-pigment-css/styles.css';
107
+
+import '@mui/material-pigment-css/styles.css';
106
108
107
109
export default function RootLayout(props) {
108
110
return (
@@ -155,7 +157,7 @@ Finally, add the Pigment CSS stylesheet to the top of the main file.
0 commit comments