Skip to content

Architecture Diagram Config Schema ​

txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/ArchitectureDiagramConfig

The object containing configurations specific for architecture diagrams

AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenAllowednoneconfig.schema.json*

ArchitectureDiagramConfig Type ​

object (Architecture Diagram Config)

all of

ArchitectureDiagramConfig Properties ​

PropertyTypeRequiredNullableDefined by
paddingnumberRequiredcannot be nullMermaid Config
iconSizenumberRequiredcannot be nullMermaid Config
fontSizenumberRequiredcannot be nullMermaid Config
randomizebooleanRequiredcannot be nullMermaid Config
nodeSeparationnumberRequiredcannot be nullMermaid Config
idealEdgeLengthMultipliernumberRequiredcannot be nullMermaid Config
edgeElasticitynumberRequiredcannot be nullMermaid Config
numIternumberRequiredcannot be nullMermaid Config
seednumberRequiredcannot be nullMermaid Config

padding ​

padding

padding Type ​

number

padding Default Value ​

The default value is:

json
40

iconSize ​

iconSize

iconSize Type ​

number

iconSize Default Value ​

The default value is:

json
80

fontSize ​

fontSize

fontSize Type ​

number

fontSize Default Value ​

The default value is:

json
16

randomize ​

Whether to randomize initial node positions before running the layout algorithm. When false (default), nodes start at deterministic seed positions. When true, nodes start at random positions, which may produce varied but potentially better-spaced layouts. Note: randomize: false alone does NOT guarantee identical renders, because the underlying fcose layout still uses Math.random() internally during its constraint solver — use the seed option for full determinism.

randomize

randomize Type ​

boolean

randomize Default Value ​

The default value is:

json
false

nodeSeparation ​

Minimum separation (in pixels) between sibling nodes in the same group, passed through to the underlying fcose layout. Increase to spread overlapping siblings apart when many edges share the same port direction.

nodeSeparation

nodeSeparation Type ​

number

nodeSeparation Default Value ​

The default value is:

json
75

idealEdgeLengthMultiplier ​

Multiplier applied to iconSize to compute the ideal length of edges between nodes within the same group. Increase to add breathing room; decrease to pack the diagram tighter. Edges crossing group boundaries are unaffected and use a fixed shorter length.

idealEdgeLengthMultiplier

idealEdgeLengthMultiplier Type ​

number

idealEdgeLengthMultiplier Default Value ​

The default value is:

json
1.5

edgeElasticity ​

Spring elasticity (0–1) applied to edges between nodes within the same group, passed through to fcose. Higher values pull connected nodes closer together; lower values let the layout spread them out. Edges crossing group boundaries are unaffected.

edgeElasticity

edgeElasticity Type ​

number

edgeElasticity Default Value ​

The default value is:

json
0.45

numIter ​

Maximum number of iterations the fcose layout algorithm runs before stopping. Increase for higher quality on large or densely-connected diagrams at the cost of render time.

numIter

numIter Type ​

number

numIter Default Value ​

The default value is:

json
2500

seed ​

Deterministic seed for the fcose layout. Defaults to 1, which makes every render of the same diagram produce the same layout — required for visual regression tests to be stable. Set to 0 to opt out and use the unstubbed Math.random (the layout will still differ slightly between renders, matching pre-fix behavior). Any other number selects a different reproducible layout variant.

seed

seed Type ​

number

seed Default Value ​

The default value is:

json
1
Opens in mermaid.ai