Skip to main content

Mermaid Diagrams

Mintlify has built-in support for Mermaid diagrams. Use standard fenced code blocks with the mermaid language identifier:

Usage

```mermaid
sequenceDiagram
    participant A as User
    participant B as Service
    A->>B: Request
    B-->>A: Response
```

Features

Mintlify’s Mermaid implementation provides:
  • Automatic rendering: Diagrams are rendered automatically from the code block
  • Theme aware: Works with both light and dark themes
  • Responsive: Scales appropriately for different screen sizes

When to Use

Use Mermaid diagrams for:
  • Sequence diagrams showing message flow
  • Architecture diagrams
  • Flowcharts explaining processes
  • State diagrams

Best Practices

  • Keep diagrams focused and not overly complex
  • Use clear, descriptive labels for participants and actions
  • Consider breaking very large diagrams into multiple smaller ones