Formatting
Formatting a Sequence
Formatting helps with organization and calarity of sequences and should be used wherever possible to help communication in larger sequences. They help avoild clutter and can draw clear lines between distinct segments of long, or complicated sequences.
title: Formatting Sequence
A->B: *Italic message*
A->B: **Bold message**
A->B: ~~Strikethrough message~~
A->B: `Code message`
A->B: [Link message]()
"This is a note"
-|: This is a divider
--|: This is a dashed divider
==|: This is a delay
A->B: A message after the delay
Text formatting
Text formatting controls the style and appearence of text. There are 4 currently supported formattings for text within a sequence diagram: italic, bold, strikethrough, and code
. Text formatting is useful for emphasising certain important parts of your diagram or otherwise drawing attention to them in some way.
*italic text*
**bold text**
~~strikethrough text~~
`code text`
Messages in a sequence can also include a link attatched to the text of a message. To do this, wrap the text to be displayed in []
and the link to the resource in ()
immediately after. An example link would look like [Here is a link to google](google.com)
.
[Link text](google.com)
Seperators
Seperators are formatting pieces that seperate your sequence diagram into visually distinct parts, allowing viewers to better understand the segments of the diagram by themselves, and easily understand where certain segments end and others begin. They are especially useful in longer sequence diagrams or for particularly complex ones. There are a few different seperators; notes, dividers, dashed dividers, and delays.
"note text"
-|: divider text
--|: dashed divider text
==|: delay text
Note that you can also go without any text in these seperators and just have a blank seperator without a label, similar to messages.
Example Sequence
In this example sequence, you can see the benefits of adding formatting to a sequence. Instead of plain messages, we have a much clearer seperation of different components, sections, and notes regarding failure states.