Skip to content
Lower pricing Individual licenses are now $49/year for Studio, $25 for Core — See pricing →

Sequence Diagram

Last updated:

Mermaid Studio provides full language support for Sequence diagrams inside IntelliJ IDEA and other JetBrains IDEs. Sequence diagrams show how processes interact with each other over time, and are essential for documenting API flows, system integrations, and protocol specifications.

Syntax highlighting integrates directly with IntelliJ’s color scheme system, so diagram colors always match your editor theme.

Sequence diagram syntax highlighting in Armada Dark theme

The summary below shows the IDE support Mermaid Studio ships for sequence diagrams, grouped by capability.

IDE feature supportSelect a feature for its description.
Editing
Code Intelligence
Validation
Refactoring
Navigation & Docs
Preview
Visual Editing

Highlighting extends into the embedded JSON of properties and links blocks, and completion filters out top-level-only keywords inside control-flow blocks where Mermaid wouldn’t accept them. Parse errors are isolated per block body, so a mistake inside one alt or loop never cascades through the rest of the file.

A set of 31 context-aware live templates scaffolds the block keywords, participant and actor declarations, notes, messages, and autonumber statements that sequence diagrams use day-to-day. Type a short abbreviation, accept it from the completion popup, and tab through the template variables.

Individual abbreviations can be toggled under Settings > Tools > Mermaid Studio > Live Templates in the Sequence Diagram group. See Live Templates for the cross-cutting mechanics (triggering, contextual visibility, configuration).

AbbreviationExpansion
blooploop ... end
baltalt ... else ... end
boptopt ... end
bparpar ... and ... end
bcritcritical ... option ... end
bbrkbreak ... end
bboxParticipant grouping box (box ... end)
brectBackground rectangle (rect rgb(...) ... end)
AbbreviationExpansion
nlNote left of participant
nrNote right of participant
noNote over participant

The prta and atra templates produce as-aliased declarations; cprta and catra produce the create variants. The prj and atj templates use the typed-metadata @{type: ...} form (Mermaid 11.13.0+); cprj and catj produce the create variants of those.

AbbreviationExpansion
prtaparticipant X as "Label"
atraactor X as "Label"
cprtacreate participant X as "Label"
catracreate actor X as "Label"
prjparticipant X@{type: ...} (11.13.0+)
atjactor X@{type: ...} (11.13.0+)
cprjcreate participant X@{type: ...}
catjcreate actor X@{type: ...}

msg is the generic form: it expands the arrow as a picker variable, so you choose the operator on insert. The other ten templates each hard-code one operator for when you already know the shape you want.

AbbreviationExpansion
msgMessage with arrow picker (A -> B: text)
msSolid line, no arrowhead (A -> B: text)
msfSolid line with arrowhead (A ->> B: text)
mdDotted line, no arrowhead (A --> B: text)
mdfDotted line with arrowhead (A -->> B: text)
mcSolid line with cross (A -x B: text)
mdcDotted line with cross (A --x B: text)
maAsync solid arrow (A -) B: text)
mdaAsync dotted arrow (A --) B: text)
mbBidirectional solid (A <<->> B: text)
mdbBidirectional dotted (A <<-->> B: text)
AbbreviationExpansion
autnsautonumber 10 10 (start + step)
sequenceDiagram
participant A as Alice
participant B as Bob
A->>B: Hello
SyntaxMeaning
->Solid line
-->Dashed line
->>Solid with arrowhead
-->>Dashed with arrowhead
-xSolid with cross
--xDashed with cross
<->>Bidirectional
-)Half-arrow (Mermaid 11.13.0+)
--)Dashed half-arrow (Mermaid 11.13.0+)
sequenceDiagram
Client->>+Server: Request
Server-->>-Client: Response
sequenceDiagram
Alice->>Bob: Hello
Note right of Bob: Bob thinks
Bob-->>Alice: Hi!

For full syntax details, see the Mermaid sequence diagram documentation.