Basic Syntax
title Sequence Diagram Example
# Simple message exchange
Peter->Taylor: Hello Taylor, how are you?
Taylor->Peter: I'm doing great, thank you!
# Asynchronous message
Peter-->Taylor: Here's a document to review
note over Taylor: Reading document...
# Response after delay
Taylor->Peter: The document looks good
note over Peter,Taylor: Document approved
# Emphasized message
Peter=>Taylor: Let's finalize the project!
Arrow Types
->
: Synchronous message
-->
: Asynchronous message (dotted line)
=>
: Thick arrow (emphasized message)
<-
, <--
, <=
: Reply messages (reverse direction)
Notes
note over [Participant]
: Note above a participant
note over [Participant1],[Participant2]
: Note spanning multiple participants
note left of [Participant]
: Note to the left of a participant
note right of [Participant]
: Note to the right of a participant
Text Formatting
**bold text**
: Bold text
__italic text__
: Italic text
\n
: Line break
Tips
- Use comments starting with # to organize your diagram
- Add a title with 'title Your Diagram Title'
- You don't need to declare participants explicitly, they are automatically detected from messages