D2 examples
D2 nests with braces, and nesting draws a boundary. Once that clicks, architecture diagrams get quick.
These examples cover the shapes, the containers, and the two specialist diagram types D2 handles natively.
#Every example here is real
Each page holds a diagram that is stored, rendered and editable exactly like one you drew yourself. Open any of them, change something, and see what happens. Nothing here is a screenshot.
#In this set
Architecture diagram (D2)A system architecture diagram in D2 with nested containers and labelled connections.Containers and icons (D2)D2 containers and icon shapes building an architecture diagram that reads at a glance.Sequence diagram (D2)A D2 sequence diagram with spans, notes and self messages.UML class diagram (D2)Classes and relationships modelled with the D2 class shape, including fields and visibility.SQL schema diagram (D2)A database schema drawn with D2 sql_table shapes, showing columns, types and foreign keys.Shape variations (D2)Every D2 shape side by side on one page, so you can pick the right one without leaving the docs.
#Related
Nesting is the whole idea.
