August 15th, 2024

Mermaid: Diagramming and Charting Tool

Mermaid is a JavaScript tool for creating diagrams and charts, featuring a Live Editor for collaboration, winning the 2019 JavaScript Open Source Award, and supporting various application integrations.

Read original articleLink Icon
AppreciationFrustrationEnthusiasm
Mermaid: Diagramming and Charting Tool

Mermaid is a JavaScript-based diagramming and charting tool that allows users to create and modify diagrams dynamically using Markdown-inspired text definitions. It features a Live Editor for real-time collaboration, making it easy to design detailed diagrams and charts. The tool has received recognition, winning the 2019 JavaScript Open Source Award for "The Most Exciting Use of Technology." Additionally, Mermaid offers various integrations with popular applications, enhancing its usability across different platforms. The project is supported by a dedicated team of developers and sponsors, encouraging community involvement and contributions.

- Mermaid is a JavaScript tool for creating diagrams and charts.

- It features a Live Editor for collaborative diagramming.

- The tool won the 2019 JavaScript Open Source Award.

- Mermaid supports integrations with various applications.

- The project encourages community participation and contributions.

Related

SankeyMaster – Ultimate Sankey Diagram

SankeyMaster – Ultimate Sankey Diagram

SankeyMaster app on Apple Store creates Sankey charts for iOS, macOS, and visionOS. Features include easy data entry, drag-and-drop adjustment, rich colors, and privacy measures. Priced at $5.99, supports multiple languages.

React Flow 12: node-based UIs with computing flows and server-side rendering

React Flow 12: node-based UIs with computing flows and server-side rendering

React Flow 12 introduces SSR, dark mode, and computing flows. It's a customizable React component for node-based editors. Features include dragging nodes, zooming, and plugins for advanced applications. Used by companies like Stripe and Typeform.

CodeMirror: Extensible code editor component for the web

CodeMirror: Extensible code editor component for the web

CodeMirror is a versatile web code editor with accessibility, syntax highlighting, collaborative editing, and more. It supports multiple languages, offers extensive features, and encourages community contributions and discussions.

Mermaid Gantt diagrams are great for displaying distributed traces in Markdown (2023)

Mermaid Gantt diagrams are great for displaying distributed traces in Markdown (2023)

Mermaid Gantt diagrams offer a Markdown-friendly solution for visualizing distributed trace information. By repurposing traditional scheduling tools, users can create clear trace diagrams resembling OpenTelemetry traces, enhancing documentation and web compatibility.

Mermaid Gantt diagrams are great for displaying distributed traces in Markdown

Mermaid Gantt diagrams are great for displaying distributed traces in Markdown

Mermaid Gantt diagrams, shared by @mitsuhiko, offer a new way to visualize distributed trace information in Markdown. This method enhances understanding of system interactions and trace data in documentation.

AI: What people are saying
The comments on Mermaid highlight various user experiences and opinions about the tool.
  • Many users appreciate Mermaid's text-based format, which allows for easy version control and integration with markdown.
  • Some users express frustration with the need for a browser engine to render diagrams, suggesting it complicates usage.
  • Users note the lack of visual customization and varying syntax across diagram types as drawbacks.
  • Several comments mention the tool's integration with platforms like GitHub, GitLab, and Azure DevOps, enhancing its utility.
  • Overall, users find Mermaid useful for simple diagrams but suggest improvements for more complex needs.
Link Icon 24 comments
By @moritonal - 8 months
A key thing to appreciate is that both Github and Gitlab support rendering Mermaid graphs in their ReadMe's

[0] https://docs.gitlab.com/ee/user/markdown.html

[1] https://github.blog/developer-skills/github/include-diagrams...

By @klabetron - 8 months
I love mermaid because it’s so easily source-controlled. It also has pretty solid documentation.

Don’t love that each diagram type typically has significantly different syntax.

Also don’t love (as mentioned by another commenter) the lack of control over layout—yea there are some advanced options for this but I find them obscure and difficult to configure.

I did create an internal tool that scans my Firestore data model and outputs an ER Diagram in mermaid. Works really nicely for that.

By @xeor - 8 months
Mermaid is great for simple stuff. If you want a more advanced approach where you can even have multiple levels. Lool at c4. The best way to do c4 without paying a dime I think is https://likec4.dev/

But again, for simple stuff, mermaid! It's also natively supported in a lot of markdown renderers, like gitlab

By @throwaway89988 - 8 months
I used MermaidJS for diagrams in one of my projects.

Initially it was fun, although MermaidJS lacked support for the diagram types I used at that time.

What stooped to be fun, is that MermaidJS needs a whole Chromebrowser engine to render the diagrams and it is built on Node.js.

Trying to generate my diagrams in another environment again was a total PITA and not worth the time.

I would love if the MermaidJS devs would port everything to another tech stack, don't use a whole browser engine to render their diagrams and make diagram creation easy and reproducible for build piplelines.

By @WhyNotHugo - 8 months
MermaidJS is pretty cool. I used it at several previous organisations to document flows between services, internal data flows, and other kinds of diagrams.

The fact that it's written in plain text makes it ideal for versioning with git. You can ever update the diagram in the same patch that changes a flow.

This website design seems to be new, and it's quite disappointing that there's not a single diagram in sight. It seems like a missed opportunity, where the whole page could be filled with examples (both in text form and the rendered version).

By @twodave - 8 months
Another nice thing about Mermaid for those of us working in a .NET ecosystem is that Azure Devops supports it[0].

[0] https://learn.microsoft.com/en-us/azure/devops/project/wiki/...

By @vunderba - 8 months
Mermaid Pros

- Can be embedded as code blocks in straight markdown notes (and many markdown editors support rendering)

- Since it's not a graphic, it's text searchable

Mermaid Cons

- if you don't like the way the diagram is visually laid out there's not really an easy way to change it

By @blackice512 - 8 months
I tried to migrate to Mermaid, but despite all the disadvantages, I found that PlantUML + IDE Extension are superior in terms of syntax, diagram variation and visual customisation.
By @rogual - 8 months
I can't help but notice that the homepage has at least a hundred pictures of humans, and zero pictures of any diagrams or charts.
By @MarkMarine - 8 months
I've been using this to diagram state machines while talking about complex UI/state flows at work and people are amazed at how quick and efficient it is as a real time presentation tool. I hate most of the color themes, but the tool is pretty good and chatGPT understands the syntax so you can have some constructive diagramming conversations with the robots.
By @dmlorenzetti - 8 months
This site compares a few text-based diagramming tools, including Mermaid: https://text-to-diagram.com
By @Crier1002 - 8 months
Mermaidjs is amazing. you could ask LLM to visualise your question (e.g codebase) using mermaidjs syntax and it mostly works just fine without any syntax errors. or at least on Claude Sonnet 3.5 from my experience
By @herol3oy - 8 months
I created a front-end application + Ollama where, when you input a book name, it generates a graph using Mermaid, illustrating all character relationships
By @mooreds - 8 months
We use mermaid for our charting in our technical documentation (which is public facing). Mostly object diagrams and sequence diagrams. Moved from plantUML, which I still miss some days.

Love the ability to version control your charts as well as write them out quickly without involving a design team and still have them look pretty good.

By @buttersbrian - 8 months
Use mermaid quite often. It's best for simple flow charts, git flows, etc, but where applicable it is great.

It is especially nice combined with mkdocs and the mermaid plugin when doing documentation.

By @gmuslera - 8 months
One of its biggest advantages is how widely deployed is it, it is supported by many apps for note taking in a way or another.
By @w4rh4wk5 - 8 months
Does the CLI tool still pull in chromium to render an SVG?
By @rightisleft - 8 months
This is the best thing ive found on the internet this week...
By @danielbln - 8 months
I like to use mermaid diagrams with LLMs, it's very handy to convert any type of text (code, prose) into e.g. a flow chart to viz in mermaid.
By @OutOfHere - 8 months
I wish Reddit and Old Reddit supported Mermaid natively.
By @antman - 8 months
Don't forget that ChatGPT supports the format and you can create diagrams, idea maps, gantt etc in no time!
By @mscolnick - 8 months
marimo notebooks support mermaid as well - https://docs.marimo.io/api/diagrams.html#marimo.mermaid

It is a great tool for diagrams

By @alexandrehtrb - 8 months
Mermaid is great!