D2 examples
Here you will find a collection of examples of diagrams produced by D2.
The examples are split by layout engines. Each section features a set of diagrams which are common among every layout engine. This makes it easy for you to toggle between each page and see the differences. Each section may also have a set of diagrams which use features from that layout engine specifically. These are placed after the common set. See the page on layouts for more information on differences in layout engines.
There is no particular system to these examples. They may be written by various authors from across the web in various styles, use different themes, be complex or simple. When a source is publicly available, it is commented in the first line of the D2 code.
Note that this gallery is a collection of single files to single images. This serves to demonstrate how easy it is to use D2 to make production-level aesthetics with simple syntax. But it omits demonstration of several of the killer features: modularization (importing from multiple files), composition (separating a diagram into multiple boards), and more. Some of these examples originally were split into multiple files, and have been combined for a simplified gallery.
We welcome contributions. These are all open-source; simply submit a PR here.