I have a react app with Material UI. I know how to set the theme's default background color on body. However, I want to set a background image instead. How can I accomplish this?
const theme = createMuiTheme({
palette: {
background: {
default: ???
}
}
});
If you are using CssBaseline you can apply a global style through theme overrides and set the backgroundImage for body e.g. https://codesandbox.io/s/v30yq681ql. You should be able to set the global style through any component that you are using.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With