본문으로 건너뛰기

Text to (animated) diagrams

· 약 2분

This is a single SVG file created purely through D2 text:

Normal deploymentlocalgithubawscodedevmasterbuilderss3ec2workflows commitmerge triggerupload and runupload binaries pull binaries Hotfix deploymentlocalgithubawscodedevmasterbuilderss3ec2workflows merge triggerupload binaries pull binaries commitupload and run

D2 source to reproduce this is here: here, rendered with these parameters.

Brief factsheet:

  • Single file, weights 88kb, the vast majority is the embedded fonts so that it looks the same everywhere.
  • Well-formatted, readable D2 text (i.e. has newlines) is 85 lines.
  • Configurable. This animation has 1400ms intervals, but if you want the animation to linger for longer and shorter, simply change the flags.
  • Easily split into 2 separate SVGs (the default behavior of CLI when a flag is not passed in to animate).

C4 Model

· 약 7분

The C4 Model is a diagramming framework. Over the years, we've had many practitioners request C4 features in D2. There's even a community-maintained exporter from the C4 creator's tool, Structurizr, to D2.

The C4 Model is a loose framework. Unlike UML, which says these symbols always and must mean certain things, the C4 model is a set of diagramming concepts. It's language and tool agnostic, and these powerful concepts have proven to provide software projects with clean, mature architecture diagrams.

With the latest 0.7 release of D2, we filled the gaps in the language to have first-class support of these concepts:

Text to PowerPoint

· 약 2분

D2 is a diagramming language, and it's versatile unlike any other. For example, you can create full PowerPoint presentations with just text.

It's not D2's primary function, but rather a natural byproduct of a powerful language. D2 built features for grid diagrams and animations, and users built pixel art. And now, with Markdown and Powerpoint, D2 is the easiest way to programmatically create PowerPoint presentations.