Skip to content

Diagrams

Mermaid diagrams

marimo.mermaid

mermaid(diagram: str) -> Html

Render a diagram with Mermaid.

Mermaid is a tool for making diagrams such as flow charts and graphs. See the Mermaid documentation for details.

PARAMETER DESCRIPTION
diagram

a string containing a Mermaid diagram

TYPE: str

RETURNS DESCRIPTION
Html

An Html object.

Example
diagram = '''
graph LR
    A[Square Rect] -- Link text --> B((Circle))
    A --> C(Round Rect)
    B --> D{Rhombus}
    C --> D
'''
mo.mermaid(diagram)