Skip to content
Theme UI
GitHub

MDX Components

To provide custom components to MDX context, but still apply styles from your theme, pass an object of custom components to the ThemeProvider component. For a list of keys that can be used in the components object, see the MDX docs for components.

import { ThemeProvider } from 'theme-ui'
import theme from './theme'
import components from './components'
export default (props) => (
<ThemeProvider theme={theme} components={components}>
{props.children}
</ThemeProvider>
)
Edit the page on GitHub
Previous:
Themed
Next:
Hooks