MDXContent
Server OnlyCompiles and renders a string of MDX content.
Security
Always sanitize user-provided content before passing it to MDXContent. This includes sanitizing value, components, and dependencies.
Failing to do so puts you at risk of a cross-site scripting (XSS) attack. See the MDX security documentation for more information.
API Reference
MDXContent
View Sourcevalue *
stringThe MDX content to render.
components
MDXComponentsAdditional components to use or a function that creates them.
dependencies
Record<string, any>An object of external dependencies that will be available to the MDX source code.
remarkPlugins
PluggableListRemark plugins to use. See PluggableList for more info.
rehypePlugins
PluggableListRehype plugins to use. See PluggableList for more info.
baseUrl
stringBase URL to resolve imports and named exports from (e.g. import.meta.url)
Last updated