Canvas Components
Mermaid Component
The Mermaid component allows you to render Mermaid diagrams directly within the webchat interface. This is useful for displaying flowcharts, sequence diagrams, entity-relationship diagrams, and other visual representations.
Example Usage
Diagram Types
The Mermaid component supports all diagram types provided by the Mermaid library:
sequenceDiagram- Sequence diagrams showing interactions between actorsflowchart/graph- Flowcharts and directed graphsclassDiagram- Class diagrams for object-oriented designerDiagram- Entity-relationship diagramsstateDiagram- State machine diagramsgantt- Gantt charts for project timelinespie- Pie chartsgitGraph- Git branching diagrams- And more
Configuration
Themes
The theme parameter accepts any built-in Mermaid theme:
default- Standard Mermaid themedark- Dark background themeforest- Green-toned themeneutral- Minimal greyscale themebase- Customizable base theme
For the full Mermaid syntax reference, see the Mermaid documentation.