Skip to content

Sequence Diagrams

Sequence diagrams show how processes interact with each other over time. They are essential for documenting API flows, system integrations, and protocol specifications.

sequenceDiagram
participant Client
participant Server
participant Database
Client->>Server: HTTP Request
Server->>Database: Query
Database-->>Server: Results
Server-->>Client: HTTP Response

Mermaid Studio provides basic support for sequence diagrams:

  • Syntax highlighting for participants and messages
  • Inspections to catch common errors
  • Color provider for customizing diagram colors
  • Live preview to see your diagram as you type
  • Markdown integration for use in documentation
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
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.