Mermaid Support
Diagrammix3 supports importing and exporting diagrams using Mermaid syntax, a popular text-based diagramming language.
What is Mermaid?
Mermaid is a JavaScript-based diagramming tool that uses a markdown-like syntax to define diagrams. It's commonly used in documentation, wikis, and README files.
Example Mermaid syntax:
flowchart LR
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]
Importing Mermaid Diagrams
From Clipboard
- Copy Mermaid syntax to your clipboard
- In Diagrammix3, go to File → Import → Mermaid from Clipboard
- The diagram will be created on your canvas
From File
- Go to File → Import → Mermaid File...
- Select a
.mmdor.mermaidfile - The diagram will be imported to your canvas

Supported Diagram Types
| Mermaid Type | Diagrammix Conversion |
|---|---|
flowchart / graph | Flow chart with shapes and connectors |
sequenceDiagram | UML sequence diagram |
classDiagram | UML class diagram |
stateDiagram | State machine diagram |
State Diagram Syntax
State diagrams model the states an object can be in and transitions between states.
Basic State Diagram:
stateDiagram-v2
[*] --> Active
Active --> Inactive : deactivate
Inactive --> Active : activate
Active --> [*] : terminate
States and Transitions:
[*]represents start and end states-->creates a transition arrow: labeladds transition labels- Nested states use indentation
Composite States:
stateDiagram-v2
state Processing {
[*] --> Validating
Validating --> Executing
Executing --> [*]
}
Result: A state machine diagram with proper state shapes and labeled transitions.
Import Examples
Flowchart
Mermaid Input:
flowchart TD
A[Hard edge] -->|Link text| B(Round edge)
B --> C{Decision}
C -->|One| D[Result one]
C -->|Two| E[Result two]
Result: A top-down flowchart with rectangle, rounded rectangle, and diamond shapes connected with labeled arrows.

Sequence Diagram
Mermaid Input:
sequenceDiagram
participant A as Alice
participant B as Bob
A->>B: Hello Bob!
B-->>A: Hi Alice!
Result: A sequence diagram with two participants and message arrows.
Class Diagram
Mermaid Input:
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Result: A UML class diagram with inheritance relationships.
Exporting to Mermaid
Export Current Diagram
- Go to File → Export → Mermaid...
- Choose a save location
- The diagram is exported as a
.mmdfile
Copy as Mermaid
- Select the shapes you want to export (or select all with Cmd+A)
- Go to Edit → Copy as Mermaid
- Paste the Mermaid syntax wherever you need it

Editing Imported Diagrams
Once imported, Mermaid diagrams become native Diagrammix objects. You can:
- Move and resize shapes freely
- Change styles using the Inspector (colors, fonts, line styles)
- Add new elements using Diagrammix tools
- Modify connections by dragging endpoints
- Apply auto-layout to reorganize the diagram
The connection to the original Mermaid source is not maintained - changes are made directly to the diagram objects.
Limitations
- Complex styling: Mermaid styling directives may not fully translate
- Subgraphs: Converted to grouped shapes
- Advanced features: Some Mermaid-specific features (like click handlers) are ignored
- Round-trip: Exporting an imported diagram may not produce identical Mermaid syntax
Tips
- Clean up after import: Use auto-layout to organize imported diagrams
- Check relationships: Verify that relationship types imported correctly
- Style consistently: Apply Diagrammix styles for a polished look
- Keep the source: Save your original Mermaid files for version control