[examples] Add material-ui-pigment-css for Next.js and Vite#43065
[examples] Add material-ui-pigment-css for Next.js and Vite#43065siriwatknp merged 20 commits intomui:nextfrom
Conversation
There was a problem hiding this comment.
Nice job. Did a quick first pass and left some comments.
Visually speaking, some stuff we could improve:
- Headings in the bullet list look a bit too large.
- Emojis and headings look misaligned.
- The bullet list could be moved down so its top is aligned with the main title.
From this
to something like this (quick sketch)
Unrelated to this PR
| Pigment CSS will look through Material UI components used in the project and | ||
| extract the styles into plain CSS. |
There was a problem hiding this comment.
Is this accurate? Wouldn't Pigment also extract styles from styled, css, sx even if they're non-Material UI components?
There was a problem hiding this comment.
It's accurate, my intention is to point out the integration. We can add more to cover your point, what do you have in mind?
There was a problem hiding this comment.
With the current wording some developers might get confused and think that Pigment CSS only works for Material UI components.
…es/material-pigment-css
@brijeshb42 seems like |
…es/material-pigment-css
Netlify deploy previewhttps://deploy-preview-43065--material-ui.netlify.app/ Bundle size report |
|
@mui/core ready for a final review. |
ZeeshanTamboli
left a comment
There was a problem hiding this comment.
I tested the examples on StackBlitz instead of running them locally. The Next.js example throws an error: https://stackblitz.com/github/siriwatknp/material-ui/tree/examples/material-pigment-css/examples/material-ui-pigment-css-nextjs-ts.
However, the Vite example works fine: https://stackblitz.com/github/siriwatknp/material-ui/tree/examples/material-pigment-css/examples/material-ui-pigment-css-vite-ts?file=README.md.
This will be fixed by #43237 |
Co-authored-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com> Signed-off-by: Siriwat K <siriwatkunaporn@gmail.com>
ZeeshanTamboli
left a comment
There was a problem hiding this comment.
Just realized that both examples can be added to the Example Projects page in the documentation.
Co-authored-by: Sycamore <71297412+samuelsycamore@users.noreply.github.com> Signed-off-by: Siriwat K <siriwatkunaporn@gmail.com>
…es/material-pigment-css
…es/material-pigment-css
|
@aarongarciah Would you mind do a final review on this? All issues have been resolved. |
|
@siriwatknp I'm experiencing these errors while trying to run the projects locally. I copied the example folder and ran Next.js
Vite
|
|
@aarongarciah probably because of
|
|
@o-alexandrov ouch! I totally forgot about it, thanks. |
aarongarciah
left a comment
There was a problem hiding this comment.
@siriwatknp looks cool. I couldn't get the Next.js example to work. I tried with pnpm, npm and yarn v1 with no luck. I receive this error:
That issue is fixed by #43237. It has not been released yet but you can test with: "@mui/material": "https://pkg.csb.dev/mui/material-ui/commit/cd5410b1/@mui/material"I tested and it works on my end. |
aarongarciah
left a comment
There was a problem hiding this comment.
@siriwatknp awesome job!
That issue is fixed by #43237. It has not been released yet but you can test with:
Tested with the fixed version and works well.






There is a problem with
pnpmfor Vite example (npmandyarnwork fine) but it's not a blocker for this PR.Blocked by mui/pigment-css#193 and mui/pigment-css#191.