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
titleTopMarginintegerRequiredcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
dividerMarginnumberOptionalcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
textHeightnumberOptionalcannot be nullMermaid Config
defaultRendererstringRequiredcannot be nullMermaid Config
nodeSpacingintegerOptionalcannot be nullMermaid Config
rankSpacingintegerOptionalcannot be nullMermaid Config
diagramPaddingintegerOptionalcannot be nullMermaid Config
htmlLabelsbooleanOptionalcannot be nullMermaid Config

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

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

defaultRenderer

Decides which rendering engine that is to be used for the rendering.

defaultRenderer

  • is required

  • Type: string

  • cannot be null

  • defined in: Mermaid Config

  • tsType: string | "dagre-d3" | "dagre-wrapper" | "elk"

defaultRenderer Type

string

defaultRenderer Constraints

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

ValueExplanation
"dagre-d3"The [dagre-d3-es](https://www.npmjs.com/package/dagre-d3-es) library.
"dagre-wrapper"wrapper for dagre implemented in mermaid
"elk"Layout using [elkjs](https://github.com/kieler/elkjs)

defaultRenderer Default Value

The default value is:

json
"dagre-wrapper"

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