DocumentationDocumentationShowcaseShowcaseAboutAbout
GitHubGitHub (opens in a new tab)
  • Introduction
  • Guide
    • Organize Files
    • Markdown
    • Syntax Highlighting
    • Next.js SSG
    • Next.js I18n
    • Next.js Image
    • Next.js Link
    • LaTeX
    • Mermaid
    • TypeScript
    • Advanced
      • Rendering Tables
      • Remote Content
    • Built Ins
      • Callout
  • Themes
  • Docs Theme
    • Get Started
    • Page Configuration
    • Theme Configuration
    • Built-ins
      • Cards
      • Steps
      • Tabs
  • Blog Theme
    • Get Started
  • Custom Theme
  • More
  • About Nextra
  • Next.js Docs ↗ (opens in a new tab)
    • Introduction
    • Guide
      • Organize Files
      • Markdown
      • Syntax Highlighting
      • Next.js SSG
      • Next.js I18n
      • Next.js Image
      • Next.js Link
      • LaTeX
      • Mermaid
        • Example
        • Usage
      • TypeScript
      • Advanced
        • Rendering Tables
        • Remote Content
      • Built Ins
        • Callout
    • Themes
    • Docs Theme
      • Get Started
      • Page Configuration
      • Theme Configuration
      • Built-ins
        • Cards
        • Steps
        • Tabs
    • Blog Theme
      • Get Started
    • Custom Theme
    • More
    • About Nextra
    • Next.js Docs ↗ (opens in a new tab)
  • Showcase
  • About

On This Page

  • Example
  • Usage
Question? Give us feedback → (opens in a new tab)Edit this page on GitHub →
Documentation
Guide
Mermaid

Mermaid

Nextra supports mermaid (opens in a new tab) diagrams. Like in GitHub you can use it in your markdown files by using the mermaid code block language. Out of the box, Nextra uses @theguild/remark-mermaid (opens in a new tab) package that replaces the code block with the <Mermaid /> component.

Example

Usage

Markdown
```mermaid
graph TD;
subgraph AA [Consumers]
A[Mobile app];
B[Web app];
C[Node.js client];
end
subgraph BB [Services]
E[REST API];
F[GraphQL API];
G[SOAP API];
end
Z[GraphQL API];
A --> Z;
B --> Z;
C --> Z;
Z --> E;
Z --> F;
Z --> G;
```
LaTeXTypeScript

Powered byVercel

© 2023 The Nextra Project.