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

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), the layout is deterministic and produces identical results on every render. When true, nodes start at random positions, which may produce varied but potentially better-spaced layouts.

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
Opens in mermaid.ai