mermaid element¶
Mermaid diagram, rendered client-side.
Fields¶
| Field | Type | Default | Description |
|---|---|---|---|
mermaid |
string | required | Mermaid diagram source code, rendered client-side by mermaid.js. Authored inline or via mermaid_file: "path/to/diagram.mmd" (the file form reads the file at parse time). |
mermaid_file |
path (optional) | null |
Path to a file whose text becomes mermaid, relative to the slide source file (e.g. "diagram.mmd"). Read and inlined at parse time. Author exactly one of mermaid / mermaid_file; validated slides always carry mermaid. |
Every element also shares the common fields — position, size, anchor, opacity, scale, and angle.
Example¶
{
// Mermaid diagram source, rendered client-side by mermaid.js.
mermaid: "graph LR; A[Author] --> B[scrolly build] --> C[HTML];",
position: [50, 50],
anchor: [50, 50],
width: 70,
}