mermaid diagrams
on this page
This site supports Mermaid diagrams for creating flowcharts, sequence diagrams, and other visualizations directly in your content.
Using Mermaid in MDX
You can use Mermaid diagrams in two ways:
Method 1: Markdown Code Blocks
Use standard markdown code blocks with the mermaid
language identifier:
Rendering diagram...
Method 2: Component with Title and Description
Architecture Overview
Rendering diagram...
This diagram shows the system architecture with its main components
Examples
Flowchart
Rendering diagram...
Sequence Diagram
Rendering diagram...
Class Diagram
Rendering diagram...
State Diagram
Rendering diagram...
Entity Relationship Diagram
Rendering diagram...
Gantt Chart
Rendering diagram...
Pie Chart
Rendering diagram...
Git Graph
Rendering diagram...
Adding Links to Nodes
While Mermaid supports a click
syntax for adding links, it can be unreliable with this site’s configuration, causing rendering issues. The recommended and most stable method is to embed raw HTML <a>
tags directly within the node labels.
Rendering diagram...
Features
The Mermaid integration includes:
- Theme Support: Diagrams automatically adapt to light/dark mode
- Copy Code: Copy the Mermaid code to clipboard
- Export SVG: Download diagrams as SVG files
- Export PNG: Download diagrams as PNG images
- Fullscreen View: View complex diagrams in fullscreen mode
- Error Handling: Graceful fallback for invalid diagrams
Tips
- Keep diagrams simple: Complex diagrams can be hard to read on mobile devices
- Use descriptive labels: Clear labels make diagrams more understandable
- Test rendering: Preview your diagrams to ensure they render correctly
- Consider accessibility: Add descriptions for screen readers when possible