Skip to content

Width

Use the width attribute to customize the width of a diagram in pixels instead of using the computed width.

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

The above code block will be rendered as the following diagram with a width of 50 pixels:

Diagram