A Typst package to draw sequence diagrams with CeTZ
This package lets you render sequence diagrams directly in Typst. The following boilerplate code creates an empty sequence diagram with two participants:
Typst | Result |
|
Disclaimer
The package cannot parse PlantUML syntax for the moment, and thus requires the use of element functions, as shown in the examples. A PlantUML parser is in the TODO list, just not the top priority
Basic sequences
You can make basic sequences using the _seq
function:
Typst | Result |
|
You can make lifelines using the following parameters of the _seq
function:
enable-dst
: enables the destination lifelinecreate-dst
: creates the destination lifeline and participantdisable-dst
: disables the destination lifelinedestroy-dst
: destroys the destination lifeline and participantdisable-src
: disables the source lifelinedestroy-src
: destroy the source lifeline and participant
Typst | Result |
|
Showcase
Several features have already been implemented in Chronos. Don’t hesitate to checkout the examples in the gallery folder to see what you can do.
Quick example reference:
Example | Features |
Simple cases, color sequences, groups, separators, gaps, self-sequences | |
Lifelines, found/lost messages, synchronized sequences, slanted sequences | |
Participant shapes, sequence tips, hidden partipicant ends | |
Notes (duh), deferred participant creation |
[!NOTE]
Many examples were taken/adapted from the PlantUML documentation on sequence diagrams