MDX
More info
- Type
- Document format
- Released
- 2018
- License
- MIT
- Extension
.mdx
Markdown that is allowed to import and render React components in the middle of the prose.
It came out of a concrete problem in 2018: documentation sites wanted Markdown's writing comfort but also needed interactive demos, diagrams and tabs mid-paragraph, and until then every project invented its own shortcode syntax. MDX instead made JSX a first-class citizen of the document — import at the top, components sitting among the paragraphs.
Version 2 (2021) rewrote the parser on micromark and added expressions in braces, which made the format far more predictable. It underpins documentation across much of the JavaScript ecosystem: Next.js, Docusaurus, Astro and Storybook. The trade-off is that an .mdx file is no longer plain text — it needs a build step and a component library before it means anything at all.