-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
linked in docsThe issue is linked in the docs, so completely skew the upvotes.The issue is linked in the docs, so completely skew the upvotes.package: joy-uiSpecific to Joy UI.Specific to Joy UI.support: docs-feedbackFeedback from documentation page.Feedback from documentation page.
Description
Related page
https://mui.com/joy-ui/integrations/material-ui/#set-up-the-providers , https://mui.com/material-ui/integrations/theme-scoping/
Kind of issue
Unclear explanations
Issue description
I'm using Joy UI with Material UI. However, I dont understand which document is right.
import { ThemeProvider, THEME_ID, createTheme } from '@mui/material/styles';
import { AnotherThemeProvider } from 'another-ui-library';
const materialTheme = createTheme(/* your theme */);
function App() {
return (
<AnotherThemeProvider>
<ThemeProvider theme={{ [THEME_ID]: materialTheme }}>
{/* components from another library and Material UI */}
</ThemeProvider>
</AnotherThemeProvider>
);
}
or this ;
import {
extendTheme as materialExtendTheme,
CssVarsProvider as MaterialCssVarsProvider,
THEME_ID as MATERIAL_THEME_ID,
} from '@mui/material/styles';
import { CssVarsProvider as JoyCssVarsProvider } from '@mui/joy/styles';
import CssBaseline from '@mui/material/CssBaseline';
const materialTheme = materialExtendTheme();
export default function App() {
return (
<MaterialCssVarsProvider theme={{ [MATERIAL_THEME_ID]: materialTheme }}>
<JoyCssVarsProvider>
<CssBaseline enableColorScheme />
...Material UI and Joy UI components
</JoyCssVarsProvider>
</MaterialCssVarsProvider>
);
}
Context
No response
Search keywords: using-joy-with-mui
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
linked in docsThe issue is linked in the docs, so completely skew the upvotes.The issue is linked in the docs, so completely skew the upvotes.package: joy-uiSpecific to Joy UI.Specific to Joy UI.support: docs-feedbackFeedback from documentation page.Feedback from documentation page.