Skip to main content

Imports

A note on imported boards

Let's say I have two files:

index.d2

asdf.d2

When you have index.d2 open, it will show the imported layer from asdf.d2:

Imported boards

However, this board is not editable within index.d2. You can't add shapes, remove shapes, change colors, etc. Though it's technically possible within the syntax via something like layers.hello.qwer.style.fill: red, we feel it's cleaner to have this constraint as it encourages unmaintainable and brittle diagram code. Instead, if you've imported a file which has its own set of boards, those boards should be edited in that file. So in this case, you'd open asdf.d2 to change things in the hello board.