Obsidian’s versatility is undeniable. The popular productivity tool offers a wide range of features to enhance your note-taking setup. But are you truly unlocking its full potential? Beneath its simple interface is a tool called Mermaid. It is a built-in JavaScript-based diagramming and charting tool that allows you to create various types of visualizations using simple text-based syntax.
If you are tired of text-heavy documents and want a more intuitive way to organize your thoughts, prepare to be amazed by Mermaid.
Here’s how to build a virtual museum of your digital life in Obsidian
Build a digital life repository in Obsidian
What is Mermaid in Obsidian?
Mermaid is a simple text syntax that defines and generates various types of diagrams. Obsidian already comes with a canvas to map out your ideas on a giant infinite canvas. But Mermaid takes your visual thinking to the next level. Instead of dragging and dropping shapes, you can write code-like instructions, which Mermaid then renders into visual diagrams.
The good news is that Mermaid is natively integrated into Obsidian. You don’t need to deal with external plugins, separate applications, or other hacks to create diagrams. It’s right there on your Obsidian page and ready to use.
As expected, Mermaid lets you transform your complex ideas and processes into clear, easy-to-understand diagrams on your Obsidian page. Combined with other powerful Obsidian features, this greatly enhances productivity for your Personal Knowledge Management (PKM) system.
Creating a Mermaid flowchart in Obsidian
You can simply fire up your Obsidian vault, create a new page, and start writing the code. First, you will need a Mermaid code block and add a command with the type of diagram you would like to create.
You can insert a flowchart, sequence diagram, class diagram, Gantt charts, pie charts, and even git graphs using Mermaid in Obsidian. In the example below, I will focus on a flowchart. Before we start, make sure to memorize these node shapes for your diagram.
- [Square]
- (Rounded)
- ((Circle))
- >Rhombus]
- {Decision}
- [[Database]]
- [/Subroutine/]
- [(Parallelogram)]
- [/Parallelogram reverse/]
- [(Trapezoid)]
- [/Trapezoid reverse/]
Now, you can use the different arrows to link nodes in your diagrams.
--> (Solid arrow)
--- (Solid line)
-- text --> (Labelled arrow)
-.-> (Dashed arrow)
-.- (Dashed line)
Let’s create a basic flowchart representing a ‘Coffee Making Process’.
```mermaid
graph TD
A[Start] --> B{Water Heated?};
B -- Yes --> C[Add Coffee];
B -- No --> D[Heat Water];
D --> B;
C --> E[Add Milk/Sugar];
E --> F[Enjoy Coffee!];
F --> G[End];
```
Here is what the final graph should look like.
I have used graph TD, which indicates that we are creating a top-down flowchart in Obsidian. Similarly, you can use graph LR (left-right), graph BT (bottom-top), and graph RL (right-left) and change the flowchart arrangement accordingly. Let’s go over another example, shall we?
We will create a sequence diagram focusing on a website user authentication flow. Suppose you are documenting a web application or API in Obsidian; this diagram provides a clear visual representation of the authentication process.
```mermaid
sequenceDiagram
participant User
participant Browser
participant Server
User->>Browser: Enters Credentials
Browser->>Server: Sends Login Request
Server-->>Browser: Authenticates User
alt Authentication Successful
Browser->>User: Displays Dashboard
else Authentication Failed
Browser->>User: Shows Error Message
end
```
You can create a Gantt chart in Obsidian as well. Let’s create a home renovation project using Mermaid in Obsidian.
```mermaid
gantt
title Home Renovation Schedule
section Planning & Demolition
Design & Permits :done, plan1, 2024-04-01, 7d
Demolition :active, demo1, after plan1, 5d
section Structural & Electrical
Framing :struct1, after demo1, 7d
Electrical Wiring :elec1, after struct1, 5d
Plumbing :plumb1, after elec1, 4d
section Interior & Finishing
Drywall & Insulation :drywall1, after plumb1, 6d
Painting :paint1, after drywall1, 4d
Flooring :floor1, after paint1, 5d
Fixtures & Appliances :fix1, after floor1, 3d
section Final Touches
Cleanup :clean1, after fix1, 2d
Final Inspection :inspect1, after clean1, 1d
```
You can customize the appearance of the flowchart using Mermaid syntax (e.g., changing node shapes, colors, or line styles). The possibilities are endless here. You can learn more about Mermaid from the company’s official website.
7 reasons Obsidian is better than Notion for productivity seekers
Obsidian is the productivity hack Notion can’t match
Why should you use Mermaid in Obsidian?
Mermaid enhances visual communication in your Obsidian setup. Since it’s directly integrated into Obsidian, you can create diagrams directly within your notes and eliminate the need to switch between applications. This saves time and keeps your workflow focused.
It improves note clarity, simplifies collaboration, and increases productivity. If you modify the text that generates the Mermaid diagram, the diagram will automatically update. This ensures that diagrams remain current.
Before creating a Mermaid in Obsidian, make sure to plan it out on blank paper. That way, you have a clear idea of execution and focus on writing efficient code.
Stop typing, start visualizing
Mermaid is a surprisingly simple tool that can dramatically enhance your Obsidian experience. If you are tired of using canvas, explore Mermaid to transform complex ideas into clear, visual diagrams. It does require a learning curve, though. But I recommend taking some time to experiment with Mermaid, and you will surely see how it can transform your note-taking process.
If you are new to Obsidian, check out the top tips and tricks to boost your productivity.
