About This Resource

D2 is a declarative language that converts text into diagrams. The documentation homepage describes its syntax and features, including production-ready themes, sketch mode, animated diagrams, LaTeX and Markdown support, code snippets, tables, sequence and UML class diagrams, containers, multiple layout engines, variables, globs, imports, an autoformatter, and a language API. It also covers tooling such as a local CLI with watch mode, VSCode and Vim editor support, an online playground, custom fonts, interactive tooltips and links, and exporting to SVG, PNG, PDF, PPTX, GIF, and ASCII.