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.

/** @jsx jsx */
import { jsx, 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:
Styled
Next:
useThemeUI