Skip to content

Mermaid Runtime

Mermaid Studio supports project-level configuration through global settings. While individual .mermaidrc files are not yet supported, you can configure rendering options that apply to your diagrams.

Mermaid Studio uses context-based configuration that applies globally:

  • Base - Default settings for all diagrams
  • Preview - Settings for the live preview pane
  • Markdown - Settings for diagrams in Markdown files
  • Export - Settings for PNG/SVG export

Access these at Settings > Tools > Mermaid Diagrams.

You can configure individual diagrams using YAML frontmatter:

---
title: My Diagram
config:
theme: forest
look: handDrawn
---
flowchart LR
A --> B --> C

This overrides global settings for that specific diagram.

Common options include:

OptionValuesDescription
themedefault, dark, forest, neutral, baseColor theme
lookclassic, handDrawnVisual style
layoutdagre, elk, tidy-treeLayout algorithm

Each diagram type has its own configuration section. For example:

---
config:
flowchart:
curve: basis
nodeSpacing: 50
---

See the Mermaid configuration docs for the complete list of options.