36
loading...
This website collects cookies to deliver better user experience
createTheme
function and a <ThemeProvider />
component, which allows us to wrap our React app with the ThemeProvider component and pass it down a prop called theme={createTheme({})}
, so that way, any Mui component rendered within this ThemeProvider is going to use the styles set before on the theme.createTheme
function has a well defined structure. It has a component property where you can list all supported Mui component with a "Mui" prefix.stylesOverrides
and variants
is where (how the name suggests) you can override the styles and create new variants.<ThemeProvider theme={createTheme({...})} />
to set the color values Mui components are going to use when they are rendered.