Skip to content

State Diagram Config Schema

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

The object containing configurations specific for entity relationship diagrams

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

StateDiagramConfig Type

object (State Diagram Config)

all of

StateDiagramConfig Properties

PropertyTypeRequiredNullableDefined by
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
layoutstringOptionalcannot be nullMermaid Config
wrappingWidthnumberRequiredcannot be nullMermaid Config
minNodeWidthnumberRequiredcannot be nullMermaid Config
titleTopMarginintegerRequiredcannot be nullMermaid Config
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
dividerMarginnumberOptionalcannot be nullMermaid Config
sizeUnitnumberOptionalcannot be nullMermaid Config
paddingnumberOptionalcannot be nullMermaid Config
textHeightnumberOptionalcannot be nullMermaid Config
titleShiftnumberOptionalcannot be nullMermaid Config
noteMarginnumberOptionalcannot be nullMermaid Config
nodeSpacingintegerOptionalcannot be nullMermaid Config
rankSpacingintegerOptionalcannot be nullMermaid Config
forkWidthnumberOptionalcannot be nullMermaid Config
forkHeightnumberOptionalcannot be nullMermaid Config
miniPaddingnumberOptionalcannot be nullMermaid Config
fontSizeFactornumberOptionalcannot be nullMermaid Config
fontSizenumberOptionalcannot be nullMermaid Config
labelHeightnumberOptionalcannot be nullMermaid Config
edgeLengthFactorstringOptionalcannot be nullMermaid Config
compositTitleSizenumberOptionalcannot be nullMermaid Config
radiusnumberOptionalcannot 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"

layout

Defines which layout algorithm to use for rendering the diagram.

layout

layout Type

string

layout Default Value

The default value is:

json
"elk"

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

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

arrowMarkerAbsolute

arrowMarkerAbsolute Type

boolean

dividerMargin

dividerMargin

dividerMargin Type

number

dividerMargin Default Value

The default value is:

json
10

sizeUnit

sizeUnit

sizeUnit Type

number

sizeUnit Default Value

The default value is:

json
5

padding

padding

padding Type

number

padding Default Value

The default value is:

json
8

textHeight

textHeight

textHeight Type

number

textHeight Default Value

The default value is:

json
10

titleShift

titleShift

titleShift Type

number

titleShift Default Value

The default value is:

json
-15

noteMargin

noteMargin

noteMargin Type

number

noteMargin 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

forkWidth

forkWidth

forkWidth Type

number

forkWidth Default Value

The default value is:

json
70

forkHeight

forkHeight

forkHeight Type

number

forkHeight Default Value

The default value is:

json
7

miniPadding

miniPadding

miniPadding Type

number

miniPadding Default Value

The default value is:

json
2

fontSizeFactor

Font size factor, this is used to guess the width of the edges labels before rendering by dagre layout. This might need updating if/when switching font

fontSizeFactor

fontSizeFactor Type

number

fontSizeFactor Default Value

The default value is:

json
5.02

fontSize

fontSize

fontSize Type

number

fontSize Default Value

The default value is:

json
24

labelHeight

labelHeight

labelHeight Type

number

labelHeight Default Value

The default value is:

json
16

edgeLengthFactor

edgeLengthFactor

edgeLengthFactor Type

string

edgeLengthFactor Default Value

The default value is:

json
"20"

compositTitleSize

compositTitleSize

compositTitleSize Type

number

compositTitleSize Default Value

The default value is:

json
35

radius

radius

radius Type

number

radius Default Value

The default value is:

json
5
Opens in mermaid.ai