Nextra has built-in support for Mermaid diagrams, powered by theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/shuding/nextra/llms.txt
Use this file to discover all available pages before exploring further.
@theguild/remark-mermaid remark plugin. Just like on GitHub, you write diagram definitions in a fenced code block with the mermaid language tag and Nextra renders them as interactive SVGs automatically — no extra configuration or installation required.
Usage
Add a fenced code block withmermaid as the language identifier:
<Mermaid> component that renders the diagram client-side.
Examples
Flowchart
Sequence Diagram
Service Architecture
Gantt Chart
Entity Relationship Diagram
Using the Mermaid Component Directly
In addition to the code block syntax, Nextra exports a<Mermaid> component from nextra/components. This is useful when you need to pass the diagram definition dynamically or programmatically:
The
@theguild/remark-mermaid plugin automatically transforms mermaid
fenced code blocks into <Mermaid> component calls at build time, so you
rarely need to use the component directly.No Extra Configuration Required
Mermaid support is included in Nextra’s default remark plugin pipeline. You do not need to install any additional packages or add configuration tonext.config.mjs to use it.