Skip to content

Sequence Diagram Config Schema

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

The object containing configurations specific for sequence diagrams

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

SequenceDiagramConfig Type

object (Sequence Diagram Config)

all of

SequenceDiagramConfig Properties

PropertyTypeRequiredNullableDefined by
arrowMarkerAbsolutebooleanOptionalcannot be nullMermaid Config
hideUnusedParticipantsbooleanOptionalcannot be nullMermaid Config
activationWidthintegerRequiredcannot be nullMermaid Config
diagramMarginXintegerRequiredcannot be nullMermaid Config
diagramMarginYintegerRequiredcannot be nullMermaid Config
actorMarginintegerRequiredcannot be nullMermaid Config
widthintegerRequiredcannot be nullMermaid Config
heightintegerRequiredcannot be nullMermaid Config
boxMarginintegerRequiredcannot be nullMermaid Config
boxTextMarginintegerRequiredcannot be nullMermaid Config
noteMarginintegerRequiredcannot be nullMermaid Config
messageMarginintegerRequiredcannot be nullMermaid Config
messageAlignstringRequiredcannot be nullMermaid Config
mirrorActorsbooleanRequiredcannot be nullMermaid Config
forceMenusbooleanRequiredcannot be nullMermaid Config
bottomMarginAdjintegerRequiredcannot be nullMermaid Config
rightAnglesbooleanRequiredcannot be nullMermaid Config
showSequenceNumbersbooleanRequiredcannot be nullMermaid Config
actorFontSizeMultipleRequiredcannot be nullMermaid Config
actorFontFamilystringRequiredcannot be nullMermaid Config
actorFontWeightMultipleRequiredcannot be nullMermaid Config
noteFontSizeMultipleRequiredcannot be nullMermaid Config
noteFontFamilystringRequiredcannot be nullMermaid Config
noteFontWeightMultipleRequiredcannot be nullMermaid Config
noteAlignstringRequiredcannot be nullMermaid Config
messageFontSizeMultipleRequiredcannot be nullMermaid Config
messageFontFamilystringRequiredcannot be nullMermaid Config
messageFontWeightMultipleRequiredcannot be nullMermaid Config
wrapbooleanOptionalcannot be nullMermaid Config
wrapPaddingnumberOptionalcannot be nullMermaid Config
labelBoxWidthnumberOptionalcannot be nullMermaid Config
labelBoxHeightnumberOptionalcannot be nullMermaid Config
messageFontNot specifiedOptionalcannot be nullMermaid Config
noteFontNot specifiedOptionalcannot be nullMermaid Config
actorFontNot specifiedOptionalcannot be nullMermaid Config

arrowMarkerAbsolute

arrowMarkerAbsolute

arrowMarkerAbsolute Type

boolean

hideUnusedParticipants

hideUnusedParticipants

hideUnusedParticipants Type

boolean

activationWidth

Width of the activation rect

activationWidth

activationWidth Type

integer

activationWidth Constraints

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

activationWidth Default Value

The default value is:

json
10

diagramMarginX

Margin to the right and left of the sequence diagram

diagramMarginX

diagramMarginX Type

integer

diagramMarginX Constraints

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

diagramMarginX Default Value

The default value is:

json
50

diagramMarginY

Margin to the over and under the sequence diagram

diagramMarginY

diagramMarginY Type

integer

diagramMarginY Constraints

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

diagramMarginY Default Value

The default value is:

json
10

actorMargin

Margin between actors

actorMargin

actorMargin Type

integer

actorMargin Constraints

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

actorMargin Default Value

The default value is:

json
50

width

Width of actor boxes

width

width Type

integer

width Constraints

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

width Default Value

The default value is:

json
150

height

Height of actor boxes

height

height Type

integer

height Constraints

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

height Default Value

The default value is:

json
50

boxMargin

Margin around loop boxes

boxMargin

boxMargin Type

integer

boxMargin Constraints

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

boxMargin Default Value

The default value is:

json
10

boxTextMargin

Margin around the text in loop/alt/opt boxes

boxTextMargin

boxTextMargin Type

integer

boxTextMargin Constraints

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

boxTextMargin Default Value

The default value is:

json
5

noteMargin

Margin around notes

noteMargin

noteMargin Type

integer

noteMargin Constraints

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

noteMargin Default Value

The default value is:

json
10

messageMargin

Space between messages.

messageMargin

messageMargin Type

integer

messageMargin Constraints

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

messageMargin Default Value

The default value is:

json
35

messageAlign

Multiline message alignment

messageAlign

messageAlign Type

string

messageAlign Constraints

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

ValueExplanation
"left"
"center"
"right"

messageAlign Default Value

The default value is:

json
"center"

mirrorActors

Mirror actors under diagram

mirrorActors

mirrorActors Type

boolean

mirrorActors Default Value

The default value is:

json
true

forceMenus

forces actor popup menus to always be visible (to support E2E testing).

forceMenus

forceMenus Type

boolean

bottomMarginAdj

Prolongs the edge of the diagram downwards.

Depending on css styling this might need adjustment.

bottomMarginAdj

bottomMarginAdj Type

integer

bottomMarginAdj Constraints

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

bottomMarginAdj Default Value

The default value is:

json
1

rightAngles

Curved Arrows become Right Angles

This will display arrows that start and begin at the same node as right angles, rather than as curves.

rightAngles

rightAngles Type

boolean

showSequenceNumbers

This will show the node numbers

showSequenceNumbers

showSequenceNumbers Type

boolean

actorFontSize

This sets the font size of the actor's description

actorFontSize

  • is required

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

actorFontSize Type

any of the following: string or number (Details)

actorFontSize Default Value

The default value is:

json
14

actorFontFamily

This sets the font family of the actor's description

actorFontFamily

actorFontFamily Type

string

actorFontFamily Default Value

The default value is:

json
"\"Open Sans\", sans-serif"

actorFontWeight

This sets the font weight of the actor's description

actorFontWeight

  • is required

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

actorFontWeight Type

any of the following: string or number (Details)

actorFontWeight Default Value

The default value is:

json
400

noteFontSize

This sets the font size of actor-attached notes

noteFontSize

  • is required

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

noteFontSize Type

any of the following: string or number (Details)

noteFontSize Default Value

The default value is:

json
14

noteFontFamily

This sets the font family of actor-attached notes

noteFontFamily

noteFontFamily Type

string

noteFontFamily Default Value

The default value is:

json
"\"trebuchet ms\", verdana, arial, sans-serif"

noteFontWeight

This sets the font weight of actor-attached notes

noteFontWeight

  • is required

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

noteFontWeight Type

any of the following: string or number (Details)

noteFontWeight Default Value

The default value is:

json
400

noteAlign

This sets the text alignment of actor-attached notes

noteAlign

noteAlign Type

string

noteAlign Constraints

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

ValueExplanation
"left"
"center"
"right"

noteAlign Default Value

The default value is:

json
"center"

messageFontSize

This sets the font size of actor messages

messageFontSize

  • is required

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

messageFontSize Type

any of the following: string or number (Details)

messageFontSize Default Value

The default value is:

json
16

messageFontFamily

This sets the font family of actor messages

messageFontFamily

messageFontFamily Type

string

messageFontFamily Default Value

The default value is:

json
"\"trebuchet ms\", verdana, arial, sans-serif"

messageFontWeight

This sets the font weight of actor messages

messageFontWeight

  • is required

  • Type: any of the following: string or number (Details)

  • cannot be null

  • defined in: Mermaid Config

messageFontWeight Type

any of the following: string or number (Details)

messageFontWeight Default Value

The default value is:

json
400

wrap

This sets the auto-wrap state for the diagram

wrap

wrap Type

boolean

wrapPadding

This sets the auto-wrap padding for the diagram (sides only)

wrapPadding

wrapPadding Type

number

wrapPadding Default Value

The default value is:

json
10

labelBoxWidth

This sets the width of the loop-box (loop, alt, opt, par)

labelBoxWidth

labelBoxWidth Type

number

labelBoxWidth Default Value

The default value is:

json
50

labelBoxHeight

This sets the height of the loop-box (loop, alt, opt, par)

labelBoxHeight

labelBoxHeight Type

number

labelBoxHeight Default Value

The default value is:

json
20

messageFont

JavaScript function that returns a FontConfig.

By default, these return the appropriate *FontSize, *FontFamily, *FontWeight values.

For example, the font calculator called boundaryFont might be defined as:

javascript
boundaryFont: function () {
  return {
    fontFamily: this.boundaryFontFamily,
    fontSize: this.boundaryFontSize,
    fontWeight: this.boundaryFontWeight,
  };
}

messageFont

messageFont Type

unknown (Font Calculator)

noteFont

JavaScript function that returns a FontConfig.

By default, these return the appropriate *FontSize, *FontFamily, *FontWeight values.

For example, the font calculator called boundaryFont might be defined as:

javascript
boundaryFont: function () {
  return {
    fontFamily: this.boundaryFontFamily,
    fontSize: this.boundaryFontSize,
    fontWeight: this.boundaryFontWeight,
  };
}

noteFont

noteFont Type

unknown (Font Calculator)

actorFont

JavaScript function that returns a FontConfig.

By default, these return the appropriate *FontSize, *FontFamily, *FontWeight values.

For example, the font calculator called boundaryFont might be defined as:

javascript
boundaryFont: function () {
  return {
    fontFamily: this.boundaryFontFamily,
    fontSize: this.boundaryFontSize,
    fontWeight: this.boundaryFontWeight,
  };
}

actorFont

actorFont Type

unknown (Font Calculator)