cssreactjsuser-interfacematerial-uitheming

Material UI Homepage Theme?


I have attached an image of the demo that is displayed on the main page for Material UI. I really like this theme and I want to use one like it with MUI to create my web application. Is there any way that I can use this theme (style my components like this) or do I have to replicate it from scratch?

enter image description here


Solution

  • You can find the code for that theme here: https://github.com/mui/material-ui/blob/v5.8.0/docs/src/modules/brandingTheme.ts.

    You can see it used here: https://github.com/mui/material-ui/blob/v5.8.0/docs/src/BrandingProvider.tsx#L23.

    I've created a code sandbox that demonstrates using this theme: https://codesandbox.io/s/mui-docs-theme-example-0mys5d?file=/index.tsx. brandingTheme.ts in the sandbox is an exact copy of the file in GitHub. It is then used from within index.tsx in the sandbox. demo.tsx just shows a few different components in order to see the theme in action.