Skip to content

Padding

Use the pad attribute to customize the padding (in pixels) around a diagram.

src/content/docs/example.md
```d2 pad=10
Content -> Website: Astro
```

The above code block will be rendered as the following diagram with a smaller padding compared to the default (100 pixels):

Diagram