Skip to content

D2 Diagrams

D2 is a modern diagram language that turns text into diagrams. It focuses on readability and produces clean, well-laid-out output.

Diagram Diagram Diagram Diagram Diagram

Use a fenced code block with the d2 language identifier:

```d2
x -> y -> z
```

D2 supports many diagram types and features including containers, connections, shapes, icons, and themes. Diagrams render as SVGs with automatic dark mode support.