Architecture Diagram Config Schema
https://mermaid.js.org/schemas/config.schema.json#/$defs/ArchitectureDiagramConfigThe object containing configurations specific for architecture diagrams
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|---|---|---|---|---|---|---|---|
| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | config.schema.json* |
ArchitectureDiagramConfig Type
object (Architecture Diagram Config)
all of
ArchitectureDiagramConfig Properties
| Property | Type | Required | Nullable | Defined by |
|---|---|---|---|---|
| padding | number | Required | cannot be null | Mermaid Config |
| iconSize | number | Required | cannot be null | Mermaid Config |
| fontSize | number | Required | cannot be null | Mermaid Config |
| randomize | boolean | Required | cannot be null | Mermaid Config |
| nodeSeparation | number | Required | cannot be null | Mermaid Config |
| idealEdgeLengthMultiplier | number | Required | cannot be null | Mermaid Config |
| edgeElasticity | number | Required | cannot be null | Mermaid Config |
| numIter | number | Required | cannot be null | Mermaid Config |
| seed | number | Required | cannot be null | Mermaid Config |
padding
padding
is required
Type:
numbercannot be null
defined in: Mermaid Config
padding Type
number
padding Default Value
The default value is:
40iconSize
iconSize
is required
Type:
numbercannot be null
defined in: Mermaid Config
iconSize Type
number
iconSize Default Value
The default value is:
80fontSize
fontSize
is required
Type:
numbercannot be null
defined in: Mermaid Config
fontSize Type
number
fontSize Default Value
The default value is:
16randomize
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
is required
Type:
booleancannot be null
defined in: Mermaid Config
randomize Type
boolean
randomize Default Value
The default value is:
falsenodeSeparation
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
is required
Type:
numbercannot be null
defined in: Mermaid Config
nodeSeparation Type
number
nodeSeparation Default Value
The default value is:
75idealEdgeLengthMultiplier
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
is required
Type:
numbercannot be null
defined in: Mermaid Config
idealEdgeLengthMultiplier Type
number
idealEdgeLengthMultiplier Default Value
The default value is:
1.5edgeElasticity
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
is required
Type:
numbercannot be null
defined in: Mermaid Config
edgeElasticity Type
number
edgeElasticity Default Value
The default value is:
0.45numIter
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
is required
Type:
numbercannot be null
defined in: Mermaid Config
numIter Type
number
numIter Default Value
The default value is:
2500seed
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
is required
Type:
numbercannot be null
defined in: Mermaid Config
seed Type
number
seed Default Value
The default value is:
1