Skip to main content

Diagram Options

BlockDiag​

Applies to blockdiag, seqdiag, actdiag, nwdiag, packetdiag and rackdiag:

NameAllowable ValuesDescription
antialias_flag_ empty string ("")Apply anti-alias filter to diagram image With flag set, option takes effect.
no-transparency_flag_< empty string ("")Disable transparent background of diagram (PNG only) With flag set, option takes effect.
size_dimension format {width}x{height}_ ex. 320x240Size of diagram
no-doctype_flag_ empty string ("")Omit doctype definition tag (SVG only) With flag set, option takes effect.

D2​

NameAllowable ValuesDescription
theme_ default (0) _ neutral-gray (1) _ flagship-terrastruct (3) _ cool-classics (4) _ mixed-berry-blue (5) _ grape-soda (6) _ aubergine (7) _ colorblind-clear (8) _ vanilla-nitro-cola (100) _ orange-creamsicle (101) _ shirley-temple (102) _ earth-tones (103) _ everglade-green (104) _ buttered-toast (105) _ dark-mauve (200) _ terminal (300) * terminal-grayscale (301)See: https://d2lang.com/tour/themes/
layout_ dagre (default) _ elkUse an alternate layout engine: https://d2lang.com/tour/layouts/
sketchflag empty string ("")Render diagram with a hand-drawn aesthetic: https://d2lang.com/tour/sketch/

Ditaa​

NameAllowable ValuesDescription
no-antialiasany +Turns anti-aliasing off
no-separationany +Prevents the separation of common edges of shapes
round-cornersany +Causes all corners to be rendered as round corners
scaledouble 1.0A natural number that determines the size of the rendered image. The units are fractions of the default size (2.5 renders 1.5 times biggerthan the default)
no-shadowsany +Turns off the drop-shadow effect
tabsany +Tabs are normally interpreted as 8 spaces but it is possible to change that using this option
backgroundsix-digit hexadecimal number FFFFFFThe background colour of the image. The format should be a six-digit hexadecimal number (as in HTML, FF0000 for red). This is overridden by transparent
transparentany +Makes the background of the image transparent. This overrides background

GoAT​

NameAllowable ValuesDescription
svg-color-dark-schemestring #FFFGoat’s SVG output attempts to learn something about the background being drawn on top of by means of a CSS @media query, which returns a string. If the string is "dark", Goat draws with the color specified by this option; otherwise, Goat draws with the color specified by option svg-color-light-scheme. See: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute Default value of 'currentColor' as tested on Firefox is one suitable for a "light-mode" display, therefore is dark.
svg-color-light-schemestring #000See svg-color-dark-scheme.
utf8flag empty string ("")Diagram input contains UTF-8 BOX characters. Goat treats only these as graphics; ASCII characters regarded by Markdeep as coding for graphics are treated as ordinary text.

GraphViz​

NameAllowable ValuesDescription
graph-attribute-+{name}+any trueSet a graph attribute: https://graphviz.org/doc/info/command.html#-G
node-attribute-+{name}+any trueSet a default node attribute: https://graphviz.org/doc/info/command.html#-N
edge-attribute-+{name}+any trueSet a default edge attribute: https://graphviz.org/doc/info/command.html#-E
layoutstring dot neato fdp sfdp twopi circoSpecifies which default layout algorithm to use, overriding the default from the command name: https://graphviz.org/doc/info/command.html#-K
scaledouble 72.0Set input scale to scale. If this value is omitted, 72.0 is used. This number is used to convert the point coordinate units used in the pos attribute into inches, which is what is expected by neato and fdp: https://graphviz.org/doc/info/command.html#-s

Mermaid​

Mermaid naming convention for configuration is camelCase, for instance: htmlLabels. In addition, Mermaid allows to configure each diagram type using a prefix separated by a dot (.). For instance, if you want to configure the title top margin in an Entity Relation diagram, the option name is: er.titleTopMargin.

Since Kroki must be agnostic (and use consistent naming), you should use kebab-case instead of camelCase and replace . by _ (i.e., snake_case).

If we apply these rules to er.titleTopMargin it becomes er_title-top-margin. Please note that diagram options in Kroki are case-insensitive, so the following is also valid: ER_TITLE-TOP-MARGIN or ER_Title-Top-Margin.

📌 NOTE

For security reasons, the following options are not available:

  • maxTextSize
  • securityLevel
  • secure
  • startOnLoad

The complete list of options is available in Mermaid source code at: https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts

Kroki bundles the ELK and tidy-tree alternate layout engines, which were moved to external packages in Mermaid v11. You can select one using the layout diagram option (e.g., layout=elk) or the layout property in the diagram frontmatter config.

PlantUML​

NameAllowable ValuesDescription
themestring - amiga - black-knight - bluegray - blueprint - cerulean-outline - cerulean - crt-amber - crt-green - cyborg-outline - cyborg - hacker - hacker-hold - lightgray - materia-outline - materia - metal - mimeograph - minty - plain - resume-light - sandstone - silver - sketchy-outline - sketchy - spacelab - superhero-outline - superhero - unitedUse a specific theme (it will prepend the !theme directive in your diagram)
no-metadataflag empty string ("")Do not save the diagram’s source code in the generated SVG/PNG metadata

Structurizr​

NameAllowable ValuesDescription
view-keystringKey of the view (if the workspace contains more than one view)
outputstring - diagram - legendSelect the output for the specified view.

Svgbob​

NameAllowable ValuesDescription
backgroundany whiteBackdrop background will be filled with this color
font-familyany arialText will be rendered with this font
font-sizeinteger 14Text will be rendered with this font size
fill-colorany blackSolid shapes will be filled with this color
scaleany 1Scale the entire svg (dimensions, font size, stroke width) by this factor
stroke-widthany 2Stroke width for all lines

Symbolator​

NameAllowable ValuesDescription
componentstring empty string ("")Select the component that will be rendered If not set, the last component will be rendered
transparentflag empty string ("")Background will be transparent instead of white With flag set, option takes effect.
titlestring empty string ("")This title will be inserted into the diagram
scalenumber 1.0Diagram will be scaled by this factor
no-typeflag empty string ("")Omit type information for the ports
library-namestring empty string ("")Add name of a library to the diagram. Only works if title is also set