Write diagrams in standard Mermaid syntax inside fenced code blocks. MacMD Viewer renders them inline. No plugins, no config.
Visualize processes and decision trees with directional graphs.
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> E
```Show interactions between components over time.
```mermaid
sequenceDiagram
Client->>Server: HTTP Request
Server->>Database: Query
Database-->>Server: Results
Server-->>Client: JSON Response
```Model state machines and transitions.
```mermaid
stateDiagram-v2
[*] --> Idle
Idle --> Loading: fetch()
Loading --> Success: 200 OK
Loading --> Error: 4xx/5xx
Error --> Idle: retry()
Success --> [*]
```Plan project timelines and task dependencies.
```mermaid
gantt
title Project Plan
section Design
Wireframes :a1, 2024-01-01, 7d
Mockups :a2, after a1, 5d
section Dev
Frontend :b1, after a2, 14d
Backend :b2, after a2, 10d
```Display proportional data in a circular chart.
```mermaid
pie title Languages Used
"Swift" : 45
"TypeScript" : 30
"Python" : 15
"Other" : 10
```Document object-oriented structures and relationships.
```mermaid
classDiagram
class Document {
+String title
+String content
+render() HTML
}
class Renderer {
+parse(md) AST
+toHTML(ast) HTML
}
Document --> Renderer
```Use a standard fenced code block with the mermaid language tag. MacMD Viewer detects it automatically and renders the diagram inline. No configuration files, no setup, no extensions to install.
Syntax highlighting, QuickLook, live reload, and more.