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 *
string
The MDX content to render.
components
MDXComponents
Additional 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
CompileOptions['remarkPlugins']
Remark plugins to use. See PluggableList for more info.
rehypePlugins
CompileOptions['rehypePlugins']
Rehype plugins to use. See PluggableList for more info.
baseUrl
string
Base URL to resolve imports and named exports from (e.g. import.meta.url
)