Skip to main content

render_config()

Build the options passed to mermaid.initialize().

Usage

render_config(
    theme,
    look,
    layout="dagre",
)

Parameters

theme: str

A key of THEMES.

look: str

A key of LOOKS.

layout: str = "dagre"
A key of LAYOUTS. Mermaid 12 includes the ELK layout, so "elk" needs no plugin.

Returns

dict[str, Any]
Options with startOnLoad off and securityLevel strict.

Raises

ValueError
If theme, look, or layout is unknown.

Examples

>>> render_config("dark", "classic")["theme"]

‘dark’