Playground
Write some MDX code and see it render to the right. Below, you can also see the output JSX and the intermediary ASTs. This can be helpful for debugging or exploring how MDX works.
JSX
/* @jsx mdx */const makeShortcode = name => function MDXDefaultShortcode(props) {console.warn("Component " + name + " was not imported, exported, or provided by MDXProvider as global scope")return <div {...props}/>};const layoutProps = {};const MDXLayout = "wrapper"function MDXContent({components,...props}) {return <MDXLayout {...layoutProps} {...props} components={components} mdxType="MDXLayout"><h1>{`Hello, world!`}</h1></MDXLayout>;}MDXContent.isMDXComponent = true;
MDAST
{"type": "root","children": [{"type": "heading","depth": 1,"children": [{"type": "text","value": "Hello, world!","position": {"start": {"line": 1,"column": 3,"offset": 2},"end": {"line": 1,"column": 16,"offset": 15},"indent": []}}],"position": {"start": {"line": 1,"column": 1,"offset": 0},"end": {"line": 1,"column": 16,"offset": 15},"indent": []}}],"position": {"start": {"line": 1,"column": 1,"offset": 0},"end": {"line": 1,"column": 16,"offset": 15}}}
HAST
{"type": "root","children": [{"type": "element","tagName": "h1","properties": {},"children": [{"type": "text","value": "Hello, world!","position": {"start": {"line": 1,"column": 3,"offset": 2},"end": {"line": 1,"column": 16,"offset": 15}}}],"position": {"start": {"line": 1,"column": 1,"offset": 0},"end": {"line": 1,"column": 16,"offset": 15}}}],"position": {"start": {"line": 1,"column": 1,"offset": 0},"end": {"line": 1,"column": 16,"offset": 15}}}