Skip to content

Flowchart Diagram Config Schema ​

txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/FlowchartDiagramConfig

The object containing configurations specific for flowcharts

AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenAllowednoneconfig.schema.json*

FlowchartDiagramConfig Type ​

object (Flowchart Diagram Config)

all of

FlowchartDiagramConfig Properties ​

PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
titleTopMarginintegerRequiredcannot be nullMermaid Config
subGraphTitleMarginobjectRequiredcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
diagramPaddingintegerRequiredcannot be nullMermaid Config
htmlLabelsbooleanOptionalcan be nullMermaid Config
nodeSpacingintegerRequiredcannot be nullMermaid Config
rankSpacingintegerRequiredcannot be nullMermaid Config
curvestringRequiredcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
wrappingWidthnumberRequiredcannot be nullMermaid Config
minNodeWidthnumberRequiredcannot be nullMermaid Config
inheritDirbooleanOptionalcannot 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

subGraphTitleMargin ​

Defines a top/bottom margin for subgraph titles

subGraphTitleMargin

subGraphTitleMargin Type ​

object (Details)

subGraphTitleMargin Default Value ​

The default value is:

json
{
  "top": 0,
  "bottom": 0
}

arrowMarkerAbsolute ​

arrowMarkerAbsolute

arrowMarkerAbsolute Type ​

boolean

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 ​

DEPRECATED: Use global htmlLabels instead.

Flag for setting whether or not a html tag should be used for rendering labels on nodes and edges. This property is deprecated. Please use the global htmlLabels configuration instead.

htmlLabels

htmlLabels Type ​

boolean

htmlLabels Default Value ​

The default value is:

json
null

nodeSpacing ​

Defines the spacing between nodes on the same level

Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the vertical spacing for LR as well as RL graphs.

nodeSpacing

nodeSpacing Type ​

integer

nodeSpacing Constraints ​

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

nodeSpacing Default Value ​

The default value is:

json
50

rankSpacing ​

Defines the spacing between nodes on different levels

Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the vertical spacing for LR as well as RL graphs.

rankSpacing

rankSpacing Type ​

integer

rankSpacing Constraints ​

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

rankSpacing Default Value ​

The default value is:

json
50

curve ​

Defines how mermaid renders curves for flowcharts.

curve

curve Type ​

string

curve Constraints ​

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

ValueExplanation
"basis"
"bumpX"
"bumpY"
"cardinal"
"catmullRom"
"linear"
"monotoneX"
"monotoneY"
"natural"
"step"
"stepAfter"
"stepBefore"
"rounded"

curve Default Value ​

The default value is:

json
"basis"

padding ​

Represents the padding between the labels and the shape

Only used in new experimental rendering.

padding

padding Type ​

number

padding Default Value ​

The default value is:

json
15

wrappingWidth ​

Width of nodes where text is wrapped.

When using markdown strings the text is wrapped automatically, this value sets the max width of a text before it continues on a new line.

wrappingWidth

wrappingWidth Type ​

number

wrappingWidth Default Value ​

The default value is:

json
120

minNodeWidth ​

Minimum width of the label area of a node.

Labels narrower than this are widened to it, so nodes with short text get a uniform width; the node's own padding is added on top, the same way it is for wrappingWidth. Nodes with an explicit width are not affected.

minNodeWidth

minNodeWidth Type ​

number

minNodeWidth Default Value ​

The default value is:

json
120

inheritDir ​

If true, subgraphs without explicit direction will inherit the global graph direction (e.g., LR, TB, RL, BT). Defaults to false to preserve legacy layout behavior.

inheritDir

inheritDir Type ​

boolean

inheritDir Default Value ​

The default value is:

json
false
Opens in mermaid.ai