Style D2
D2 supports themes, shape properties, style blocks, classes, and sketch mode.
Start with the general presentation settings. Edit shared or raw presentation in Details, and keep renderer-specific styling in Source.
Source controls
- Put local values in an element
styleblock. - Define reusable classes when elements use the same style.
- Use shape properties to control geometry and labels.
Renderer options
| Option | Values | Purpose |
|---|---|---|
theme | D2 theme name or number | Apply a D2 theme. |
layout | dagre or elk | Select the layout engine. |
sketch | Flag | Apply the hand-drawn style. |