Private Theming
@mui/private-theming
Private - The React theme context to be shared between `@mui/styles` and `@mui/material`.
Component Libraries
react
react-component
mui
theme
@mui/private-theming
Component Libraries
javascript
npm
frontend
open source
Stars
856
Weekly
9.6M
Open issues
11
Bundle
~15 kB
Installation
npm install @mui/private-themingCode example
import Button from "@mui/material/Button";
import Stack from "@mui/material/Stack";
export function Example() {
return (
<Stack direction="row" spacing={2}>
<Button variant="contained">Primary</Button>
<Button variant="outlined">Secondary</Button>
</Stack>
);
}Pros & cons
Pros
- Actively maintained by MUI Team
- 9.6M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~15 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 11 open issues on GitHub