Coffee Help
All topics

Help Maths and diagrams

Mermaid diagrams

MaciPhone and iPad

A code block named mermaid is drawn as a diagram under it, natively. Coffee draws flowcharts, pie charts, sequence diagrams, gantt charts, class diagrams, state diagrams, entity relationship diagrams and mind maps.

An entity relationship diagram on iPhone.
An entity relationship diagram on iPhone.
A mind map on iPhone, drawn under its code block.
A mind map on iPhone, drawn under its code block.
A Mermaid flowchart, drawn under its code block in the theme's colours.
A Mermaid flowchart, drawn under its code block in the theme's colours.
A Mermaid mind map, drawn the same way.
A Mermaid mind map, drawn the same way.

How to draw a diagram

  1. Type three backticks and mermaid, to open the block.
  2. Write the diagram in Mermaid's language on the lines below.
  3. End with a line of three backticks. The diagram appears under the block.

Example

In Markdown
```mermaid
flowchart LR
  Idea --> Draft --> Review --> Publish
```

Colours

Diagrams use your theme's colours. Settings › Look › Black and white diagrams draws them in ink instead.

Good to know

  • Other Mermaid kinds stay as code.
  • A diagram that can't be drawn shows a plain hint with the line number, so you can find the mistake.

Not what you needed? Write to a person.