mermaid dart is a pure-Dart port of mermaid.js. It detects, parses and lays out the same diagram source into a backend-agnostic render scene, then paints that scene natively — no JavaScript, no WebView, no SVG round-trip. This page renders each sample two ways: the original mermaid.js in your browser (left) and mermaid dart inside an embedded Flutter web view (right), so any difference is obvious at a glance.

The TeX math labels in diagrams are rendered with katex — the same pure-Dart port of KaTeX that powers its own three-way renderer comparison. mermaid dart reuses that backend-agnostic box tree to lay out math natively in Flutter.

The ELK layout option is powered by elk — a standalone, pure-Dart port of the Eclipse Layout Kernel's layered algorithm (orthogonal edges, clusters, no elkjs, no JavaScript). It is reusable on its own for any graph layout, such as package dependency visualizations. Explore it on the ELK layout page.

Diagrams
Charts & data
Theming & styles

Flowchart

Nodes connected by edges for processes, decisions and flows — the most common Mermaid diagram.

Layout applies to flowchart, state and mindmap diagrams
Look hand-drawn works for every diagram type
opens a GitHub issue pre-filled with the source above
mermaid.js (browser)
Loading mermaid.js…
mermaid dart (Flutter)
Loading Flutter…