Skip to content
🎉MDX Conf — August 24th, 2020
MDX logo

MDX Embed

With MDX Embed you can politely embed and load 3rd party media content such as Twitter, CodePen, CodeSandbox, Egghead Lessons, Gists and many more in your .mdx, no import required!


npm install mdx-embed --save


Wrap your application with the MDXEmbedProvider to allow your .mdx to render all of the provided components

import React from 'react'
import {MDXEmbedProvider} from 'mdx-embed'

export default props => <MDXEmbedProvider>{props.children}</MDXEmbedProvider>


<!-- some-mdx-file.mdx -->

#### My cool pen

Here's a pen, and some other blog post text

<CodePen codePenId="PNaGbb" />

For the full installation and information about the various MDX packages visit the docs

Edit this page on GitHub