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 ​

当此标志设置为 true 时,高度和宽度设置为 100%,然后使用可用空间缩放。如果设置为 false,则使用所需的绝对空间。

useMaxWidth

useMaxWidth Type ​

boolean

useMaxWidth Default Value ​

The default value is:

json
true

theme ​

主题,CSS 样式表。你也可以使用 themeCSS 覆盖此值。

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 ​

定义图表要使用的主要外观。

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 ​

定义用于渲染图表的布局算法。

layout

layout Type ​

string

Opens in mermaid.ai