Class Diagram Config Schema
https://mermaid.js.org/schemas/config.schema.json#/$defs/ClassDiagramConfig| 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* |
ClassDiagramConfig Type
object (Class Diagram Config)
all of
ClassDiagramConfig Properties
| Property | Type | Required | Nullable | Defined by |
|---|---|---|---|---|
| theme | string | Optional | cannot be null | Mermaid Config |
| look | string | Optional | cannot be null | Mermaid Config |
| titleTopMargin | integer | Required | cannot be null | Mermaid Config |
| arrowMarkerAbsolute | boolean | Optional | cannot be null | Mermaid Config |
| dividerMargin | number | Optional | cannot be null | Mermaid Config |
| padding | number | Optional | cannot be null | Mermaid Config |
| textHeight | number | Optional | cannot be null | Mermaid Config |
| nodeSpacing | integer | Optional | cannot be null | Mermaid Config |
| rankSpacing | integer | Optional | cannot be null | Mermaid Config |
| diagramPadding | integer | Optional | cannot be null | Mermaid Config |
| htmlLabels | boolean | Optional | cannot be null | Mermaid Config |
| hideEmptyMembersBox | boolean | Optional | cannot be null | Mermaid Config |
| hierarchicalNamespaces | boolean | Optional | cannot be null | Mermaid Config |
theme
Theme, the CSS style sheet. You may also use themeCSS to override this value.
theme
is optional
Type:
stringcannot be null
defined in: Mermaid Config
theme Type
string
theme Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"default" | |
"base" | |
"dark" | |
"forest" | |
"neutral" | |
"neo" | |
"neo-dark" | |
"redux" | |
"redux-dark" | |
"redux-color" | |
"redux-dark-color" | |
"null" | Can be set to disable any pre-defined mermaid theme |
theme Default Value
The default value is:
"redux-color"look
Defines which main look to use for the diagram.
look
is optional
Type:
stringcannot be null
defined in: Mermaid Config
look Type
string
look Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"classic" | |
"handDrawn" | |
"neo" |
look Default Value
The default value is:
"neo"titleTopMargin
Margin top for the text over the diagram
titleTopMargin
is required
Type:
integercannot be null
defined in: Mermaid Config
titleTopMargin Type
integer
titleTopMargin Constraints
minimum: the value of this number must greater than or equal to: 0
titleTopMargin Default Value
The default value is:
25arrowMarkerAbsolute
Controls whether or arrow markers in html code are absolute paths or anchors. This matters if you are using base tag settings.
arrowMarkerAbsolute
is optional
Type:
booleancannot be null
defined in: Mermaid Config
arrowMarkerAbsolute Type
boolean
arrowMarkerAbsolute Default Value
The default value is:
falsedividerMargin
dividerMargin
is optional
Type:
numbercannot be null
defined in: Mermaid Config
dividerMargin Type
number
dividerMargin Default Value
The default value is:
10padding
padding
is optional
Type:
numbercannot be null
defined in: Mermaid Config
padding Type
number
padding Default Value
The default value is:
5textHeight
textHeight
is optional
Type:
numbercannot be null
defined in: Mermaid Config
textHeight Type
number
textHeight Default Value
The default value is:
10nodeSpacing
nodeSpacing
is optional
Type:
integercannot be null
defined in: Mermaid Config
nodeSpacing Type
integer
nodeSpacing Constraints
minimum: the value of this number must greater than or equal to: 0
rankSpacing
rankSpacing
is optional
Type:
integercannot be null
defined in: Mermaid Config
rankSpacing Type
integer
rankSpacing Constraints
minimum: the value of this number must greater than or equal to: 0
diagramPadding
The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels.
diagramPadding
is optional
Type:
integercannot be null
defined in: Mermaid Config
diagramPadding Type
integer
diagramPadding Constraints
minimum: the value of this number must greater than or equal to: 0
diagramPadding Default Value
The default value is:
20htmlLabels
htmlLabels
is optional
Type:
booleancannot be null
defined in: Mermaid Config
htmlLabels Type
boolean
htmlLabels Default Value
The default value is:
falsehideEmptyMembersBox
hideEmptyMembersBox
is optional
Type:
booleancannot be null
defined in: Mermaid Config
hideEmptyMembersBox Type
boolean
hideEmptyMembersBox Default Value
The default value is:
falsehierarchicalNamespaces
When true (default), nested namespaces render as hierarchical clusters, with each segment of a dotted name (e.g. A.B.C) becoming its own nested box. When false, namespaces render in compact mode: only explicitly declared namespaces are emitted and their full qualified name is used as a single flat label.
hierarchicalNamespaces
is optional
Type:
booleancannot be null
defined in: Mermaid Config
hierarchicalNamespaces Type
boolean
hierarchicalNamespaces Default Value
The default value is:
true