Docs/Notes/Diagrams

Diagrams

You can draw diagrams right inside a note — flowcharts, sequence diagrams, and more — by describing them in a simple text syntax. When you preview the note, your description turns into a clean, finished diagram, so you never have to fiddle with boxes and arrows by hand.

Writing a diagram

Add a cell labelled mermaid and describe the diagram inside it. Each line names a step and how it connects to the next. To drop one in quickly, right-click in the editor and choose Elements → Mermaid Diagram; you'll get an empty cell with your cursor ready inside.

```mermaid
flowchart LR
  A[Draft] --> B{Reviewed?}
  B -- yes --> C[Published]
  B -- no --> A
```

Kinds of diagrams

Many diagram styles are supported — flowcharts, sequence diagrams, class and state diagrams, entity relationships, timelines, and more. Two of the most useful:

Flowchart
Boxes and arrows. Show steps and how they branch. You can lay it out left-to-right (LR) or top-down (TD).
```mermaid
flowchart TD
  Start --> Decision{OK?}
  Decision -->|yes| End
  Decision -->|no| Start
```
Sequence diagram
Who talks to whom. Show the participants and the messages passing between them, in order.
```mermaid
sequenceDiagram
  Alice->>Bob: Question
  Bob-->>Alice: Answer
```
A finished note showing a small decision-branch flowchart, drawn neatly in its own block with colors that match the rest of the note.
A flowchart in a note
Diagrams match your theme

Diagrams use the same colors as the note around them. Switch between light, dark, or high-contrast, and your diagrams redraw to match — there's nothing extra to set up.