Home

Awesome

Structurizr D2 Exporter

OpenSSF Scorecard OpenSSF Best Practices CodeQL Maven Central

The D2Exporter class provides a way to export Structurizr views to diagram definitions that are compatible with D2.

This library is developed to be included in the Structurizr CLI, and is available on Maven Central, for inclusion in your own Java applications:

amazon.png

Table of Content

<!-- TOC -->

Customization

d2.title_position

Specifies diagram title position. For more details, see d2 near.

Example:

Source: title-position/workspace.dsl

bottom-left title: title-position.png

d2.animation

Specifies animation variant for animated structurizr views.

Example:

amazon-animated.svg

d2.animated

Example

Source: animated-relation/workspace.dsl

animated-relation.svg

Hint: Do not forget to provide --animate-interval flag when producing SVG to see the animation.

d2.fill_pattern

When set on views or view, adds a fill pattern to the background. When set on an element style, adds fill pattern to its body.

Example

Source: fill-pattern/workspace.dsl

fill-pattern.png