mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
94.02k stars 32.3k forks source link

[poc] Support a version of Material UI without CSS in JS #44407

Open mnajdova opened 1 week ago

mnajdova commented 1 week ago

This PR serves as a proof of concept of how we can build Material UI components using CSS modules, and then allow CSS in JS users to use all of the previously available APIs, like sx prop, styleOverrides etc. On the other hand, for people that care about performance or want to use plain CSS, they don't have to pay any penalty of bundle size or performance that comes from using CSS in JS.

CodeSandbox using Emotion: https://codesandbox.io/p/devbox/vite-react-forked-47ffsv (using the default @mui/styled-engine package)

CodeSandbox using only CSS modules: https://codesandbox.io/p/devbox/ssvrx2 (using the CSS modules only supported package @mui/styled-engine-noop - check vite.config.js)

mui-bot commented 1 week ago

Netlify deploy preview

https://deploy-preview-44407--material-ui.netlify.app/

Bundle size report

Bundle size will be reported once CircleCI build #767890 finishes.

Generated by :no_entry_sign: dangerJS against 9102b087f75a678319d398f166749320845e4403