Quick answer: Mintlify publishes both plain Markdown (.md) and MDX (.mdx) pages. Use plain Markdown for pages that are mostly text and headings, and MDX when a page needs interactive components such as Tabs, Cards, Steps, or Accordions, or a custom component you define. MDX is a superset of Markdown, so you can mix the two and keep most of any page in ordinary Markdown.
What MDX adds to Markdown
MDX is Markdown with a JSX layer. The familiar syntax works unchanged: headings, bold and italic text, links, lists, blockquotes, and fenced code blocks render the same in .mdx as in .md, and each page still starts with YAML frontmatter for the title, description, and sidebar settings.
The added layer is components. An MDX page can place a structured element in the middle of prose and pass it properties, so a tabbed set of samples, a grid of link cards, or a numbered walkthrough is a component with typed content rather than a hand-built table.
Plain Markdown vs MDX side by side
| Factor | Plain Markdown (.md) | MDX (.mdx) |
|---|---|---|
| Headings, lists, links, fenced code | Yes | Yes |
| Built-in components such as Tabs, Cards, Steps | Not available; expected components fall back to blockquotes | Yes, with full properties |
| Custom components and relative imports | No | Yes |
| Curly braces and angle brackets in prose | Render as typed | Must be escaped outside code blocks |
| Reusable snippet shared across pages | Limited | Any MDX file can be imported |
| Best fit | Changelogs, policies, simple text pages | Guided tutorials, tabbed samples, interactive references |
How to decide which one a page needs
Start from plain Markdown and add MDX only when a page has a concrete need. A concept page, policy, or changelog gains nothing from components and pays a small cost, because MDX has parsing rules that plain Markdown lacks.
Move to MDX when a page needs a built-in component that beats prose, a custom widget Markdown cannot express, or a reusable snippet other pages import. Most sites end up with both formats, which is the intended setup rather than a sign of inconsistency.
The escaping rule that catches new MDX authors
MDX treats curly braces as the boundaries of a JavaScript expression and the angle bracket as the start of a JSX tag. In prose, a literal brace or bracket must be escaped, or the parser tries to evaluate it. Three safe options are backticks, an HTML entity, or a JSX string expression.
Fenced code blocks are the exception. MDX does not parse braces inside a code fence, so sample code keeps normal syntax with no escaping. The rule applies only to running prose and JSX attributes.
In prose, show a literal brace with a JSX string or an HTML entity.
Inside a fenced block, { variable: value } stays literal with no escaping.
Keep object literals and brace-heavy templates inside code fences, and escape only the rare brace in a sentence. A missed escape produces a build error rather than silent wrong output, so the problem is easy to locate.
Custom components and reusable snippets
For a custom widget, define it at the end of the file as an exported component in plain JavaScript JSX, then render it with a self-closing tag. A TypeScript annotation in that block fails the whole published page. Relative imports need no extra configuration, so any MDX file can serve as a shared snippet, and the editor extension flags unknown components and missing properties while you write.
Docs only stay trustworthy when the requests inside them still work. Teams that treat documentation as part of the product use a tool like Powerduck to send those requests and run scenario tests against the live API, so a sample that drifted from real behavior gets caught before readers hit it.
Frequently asked questions
Can I use .md and .mdx in the same Mintlify site? Yes. The two formats are built to coexist, so simple pages stay in Markdown while interactive pages use MDX, with no migration between them.
Do I need to know React to write MDX? Not for built-in components, which you paste and fill with properties. React knowledge matters only for a custom widget, written in plain JSX rather than TypeScript.
What happens to components in a plain Markdown view? They degrade gracefully. A card renders as a blockquote, and an accordion as a blockquote with the title in bold, so the text survives without the interactive styling.
Are curly braces inside code blocks a problem? No. Fenced code blocks are not parsed for JSX expressions, so braces and brackets inside samples are written normally.
The bottom line
Default to plain Markdown and reach for MDX when a page genuinely needs a component, an import, or a custom widget. The real cost of MDX is not harder writing, since most syntax is identical, but the discipline of escaping braces and maintaining custom components over time. For wider build versus buy trade-offs, the Mintlify comparison hub covers how the platform fits a docs-driven workflow. Pick the format that matches the page instead of treating MDX as the default.
Comments
Join the discussionNo comments yet. Be the first to comment.

