Mermaid Macro lets you create diagrams directly in Confluence using Mermaid.js. Below are examples of all supported diagram types.
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Do Something]
B -->|No| D[Do Something Else]
C --> E[End]
D --> E[End]
sequenceDiagram
participant Alice
participant Bob
Alice->>Bob: Hello Bob, how are you?
Bob-->>Alice: I am good thanks!
Alice->>Bob: Great to hear
classDiagram
Animal <|-- Dog
Animal <|-- Cat
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Dog : +bark()
Cat : +meow()
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER {
string name
string address
}
ORDER {
int id
string date
}
LINE-ITEM {
int quantity
string product
}
stateDiagram-v2
[*] --> Idle
Idle --> Running : start
Running --> Idle : stop
Running --> Error : failure
Error --> [*]
gantt
dateFormat YYYY-MM-DD
title Project Timeline
section Planning
Research :a1, 2025-09-16, 5d
Design :after a1, 3d
section Development
Implementation :2025-09-22, 7d
Testing :2025-09-29, 4d
journey
title User buying a product
section Browse
User: 5: Looking at products
section Checkout
User: 3: Adding product to cart
User: 4: Entering payment details
section Confirmation
User: 4: Receiving order confirmation
For issues or questions, use the Atlassian Marketplace support channel.