Skip to content

ThemeProvider API

The API documentation of the ThemeProvider React component. Learn more about the props and the CSS customization points.

Import

import ThemeProvider from '@material-ui/core/styles/ThemeProvider.js/ThemeProvider';
// or
import { ThemeProvider } from '@material-ui/core/styles/ThemeProvider.js';

You can learn more about the difference by reading this guide.

This component makes the theme available down the React tree. It should preferably be used at the root of your component tree.

Props

Name Type Default Description

The component cannot hold a ref.