MDX is an authorable format that mixes Markdown with JSX so writers can import and embed React-style components in long-form content. Tooling compiles MDX to JavaScript for JSX-capable frameworks.
Overview
MDX extends Markdown with JSX syntax, letting authors import charts, alerts, and other UI pieces directly inside prose documents. The result compiles to JavaScript suitable for React, Preact, Vue, and similar environments that already understand JSX.
The project ships packages that parse and compile MDX, plus integrations for bundlers such as webpack, Rollup, esbuild, and Vite, and for site generators including Next.js, Docusaurus, and Gatsby. Authors can map markdown constructs to custom components and treat other MDX files as importable components.
Compilation happens at build time rather than in the browser at runtime, so pages keep the familiar Markdown authoring experience while gaining component interactivity where needed. An online playground lets you experiment with source and compiled output before wiring MDX into a project.
Key features
- JSX embedded in Markdown
- Build-time compilation to JavaScript
- Bundler and framework integrations
- Custom component mappings
- Import MDX files as components
- Supports React, Preact, and Vue
- Interactive documentation playground
Use cases
- Docs sites with live demos
- Blog posts with embedded widgets
- Technical writing in JSX stacks
- Shared content components across pages