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.
Basic Example
Section titled “Basic Example”sequenceDiagram participant Client participant Server participant Database
Client->>Server: HTTP Request Server->>Database: Query Database-->>Server: Results Server-->>Client: HTTP ResponseWhat You Get
Section titled “What You Get”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
Quick Syntax Reference
Section titled “Quick Syntax Reference”Participants
Section titled “Participants”sequenceDiagram participant A as Alice participant B as Bob A->>B: HelloMessage Types
Section titled “Message Types”| Syntax | Meaning |
|---|---|
-> | Solid line |
--> | Dashed line |
->> | Solid with arrowhead |
-->> | Dashed with arrowhead |
-x | Solid with cross |
--x | Dashed with cross |
Activation
Section titled “Activation”sequenceDiagram Client->>+Server: Request Server-->>-Client: ResponsesequenceDiagram Alice->>Bob: Hello Note right of Bob: Bob thinks Bob-->>Alice: Hi!For full syntax details, see the Mermaid sequence diagram documentation.