Skip to main content

Shapes

Shapes are the basic building blocks of D2 that represent entities.

Basics

Keys without hyphens - define shapes.

D2 files are key-value maps separated by newlines or semicolons, so this is valid too.

By default a shape's label is the same as the shape's key. But if want it to be different, just give assign a new label as a value.

Example

shapes render
info

Keys are case-insensitive, so postgresql and postgreSQL will reference the same thing.

info

Currently we only support a rectangle shape, but more soon to come.