# Mermaid ZenUML Diagram Cheat Sheet

A sequence diagram, written for a method call.

## The messages

A single arrow is a call, and a double arrow is a reply.

```mermaid
zenuml
    Alice->John: Hello
    John-->Alice: Hi
    Alice->Alice: think
```

![A ZenUML diagram with two lifelines, Alice and John, exchanging a Hello and a Hi, and a third message from Alice to herself labelled think.](/diagrams/zenuml/messages.svg)

## Setting the order

Name the participants on their own lines to order them yourself, instead of the order they first appear in.

```mermaid
zenuml
    Alice->John: Hello
    John-->Alice: Hi
    John->John: think
    Alice->John: Hello
    John-->Alice: Hi
```

![A ZenUML diagram with two lifelines, Bob and Alice, and a message from Alice to Bob saying Hi Bob.](/diagrams/zenuml/participants.svg)

## Draw it in Mernyx.

Open a .mmd file, move a node on the canvas, and the source comes with it. Native on macOS, no browser involved.
