Skip to content

Class Diagram Config Schema ​

txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/ClassDiagramConfig
AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenAllowednoneconfig.schema.json*

ClassDiagramConfig Type ​

object (Class Diagram Config)

all of

ClassDiagramConfig Properties ​

PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
titleTopMarginintegerRequiredcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
dividerMarginnumberOptionalcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
textHeightnumberOptionalcannot be nullMermaid Config
nodeSpacingintegerOptionalcannot be nullMermaid Config
rankSpacingintegerOptionalcannot be nullMermaid Config
diagramPaddingintegerOptionalcannot be nullMermaid Config
htmlLabelsbooleanOptionalcannot be nullMermaid Config
hideEmptyMembersBoxbooleanOptionalcannot be nullMermaid Config
hierarchicalNamespacesbooleanOptionalcannot be nullMermaid Config

theme ​

Theme, the CSS style sheet. You may also use themeCSS to override this value.

theme

theme Type ​

string

theme Constraints ​

enum: the value of this property must be equal to one of the following values:

ValueExplanation
"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:

json
"redux-color"

look ​

Defines which main look to use for the diagram.

look

look Type ​

string

look Constraints ​

enum: the value of this property must be equal to one of the following values:

ValueExplanation
"classic"
"handDrawn"
"neo"

look Default Value ​

The default value is:

json
"neo"

titleTopMargin ​

Margin top for the text over the diagram

titleTopMargin

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:

json
25

arrowMarkerAbsolute ​

Controls whether or arrow markers in html code are absolute paths or anchors. This matters if you are using base tag settings.

arrowMarkerAbsolute

arrowMarkerAbsolute Type ​

boolean

arrowMarkerAbsolute Default Value ​

The default value is:

json
false

dividerMargin ​

dividerMargin

dividerMargin Type ​

number

dividerMargin Default Value ​

The default value is:

json
10

padding ​

padding

padding Type ​

number

padding Default Value ​

The default value is:

json
5

textHeight ​

textHeight

textHeight Type ​

number

textHeight Default Value ​

The default value is:

json
10

nodeSpacing ​

nodeSpacing

nodeSpacing Type ​

integer

nodeSpacing Constraints ​

minimum: the value of this number must greater than or equal to: 0

rankSpacing ​

rankSpacing

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

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:

json
20

htmlLabels ​

htmlLabels

htmlLabels Type ​

boolean

htmlLabels Default Value ​

The default value is:

json
false

hideEmptyMembersBox ​

hideEmptyMembersBox

hideEmptyMembersBox Type ​

boolean

hideEmptyMembersBox Default Value ​

The default value is:

json
false

hierarchicalNamespaces ​

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

hierarchicalNamespaces Type ​

boolean

hierarchicalNamespaces Default Value ​

The default value is:

json
true
Opens in mermaid.ai