Skip to content

Base Diagram Config Schema

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

BaseDiagramConfig Type

object (Base Diagram Config)

BaseDiagramConfig Properties

PropertyTypeRequiredNullableDefined by
useWidthnumberOptionalcannot be nullMermaid Config
useMaxWidthbooleanOptionalcannot be nullMermaid Config
themestringOptionalcannot be nullMermaid Config
lookstringOptionalcannot be nullMermaid Config
layoutstringOptionalcannot be nullMermaid Config

useWidth

useWidth

useWidth Type

number

useMaxWidth

When this flag is set to true, the height and width is set to 100% and is then scaled with the available space. If set to false, the absolute space required is used.

useMaxWidth

useMaxWidth Type

boolean

useMaxWidth Default Value

The default value is:

json
true

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

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"

layout

Defines which layout algorithm to use for rendering the diagram.

layout

layout Type

string

Opens in mermaid.ai