Close Menu
    Facebook X (Twitter) Instagram
    Wifi PortalWifi Portal
    • Blogging
    • SEO & Digital Marketing
    • WiFi / Internet & Networking
    • Cybersecurity
    • Tech Tools & Mobile / Apps
    • Privacy & Online Earning
    Facebook X (Twitter) Instagram
    Wifi PortalWifi Portal
    Home»Tech Tools & Mobile / Apps»I started coding my diagrams and it’s so much faster than dragging boxes
    Tech Tools & Mobile / Apps

    I started coding my diagrams and it’s so much faster than dragging boxes

    adminBy adminFebruary 2, 2026No Comments5 Mins Read
    Facebook Twitter LinkedIn Telegram Pinterest Tumblr Reddit WhatsApp Email
    I started coding my diagrams and it's so much faster than dragging boxes
    Share
    Facebook Twitter LinkedIn Pinterest Email

    When we hear the word “code,” we often assume it’s meant for highly technical people. But sometimes, it just means entering simple commands into a program to get a result. In this case, the program is Mermaid — an open-source JavaScript library with a web-based live editor that converts human-readable commands into diagrams such as flowcharts, pie charts, Gantt charts, sequence diagrams, and Kanban boards.

    Using Mermaid has made me much faster at creating diagrams than when I used diagramming and visualization tools like Lucidchart and draw.io (officially Diagrams.net). I know their drag-and-drop interfaces are meant to be easy and intuitive, but they can get in the way. Coding in Mermaid eliminates the visual noise and lets me focus on the content itself.

    Mermaid logo

    Developer

    Knut Sveidqvist

    Price model

    Free with paid tier, Open-source

    Mermaid is a free, open-source tool that lets you create diagrams by writing simple text instead of dragging boxes around.


    Drawing a diagram is as quick as writing a note

    Code-as-diagram is a breath of fresh air

    To create a diagram using a drag-and-drop interface, you have to drag a box onto the canvas, then double-click it to insert text. After you’re done adding your shapes, you have to insert the connectors, aiming for small connection handles or precise connector endpoints. All this clicking, dragging, and typing can get tiring if you have to make a long diagram.

    That’s why I say Mermaid is a breath of fresh air, since it makes drawing a diagram as easy as writing a note in something like Notepad. It uses syntax that mimics natural communication, making it easier to learn.

    Slides generated using NotebookLM on a mobile phone placed beside the Google NotebookLM Logo.

    I stopped making PowerPoints — this free tool turns my notes into diagrams instantly

    I still do the thinking; I just stopped doing the designing.

    Let’s look at a simple example. In Mermaid, you first need to specify the diagram you want to create. In this case, let’s do a flowchart. But you also need to specify the direction you want it to go — right to left (LR) or top to bottom (TD).

    flowchart LR
    

    The line below will add a box (also known as a node) with the label Box 1 to the flowchart. The A before the square brackets is the box’s ID (you can name it anything).

    flowchart LR
        A[Box 1]
    

    You can link the node to another box using a connector (also known as an edge) with the code below.

    flowchart LR
        A[Box 1] --> B[Box 2]
    

    These two lines of code have done what would otherwise require multiple clicks and drags. You can even add a label to the arrow with the code below:

    flowchart LR
        A[Box 1] -->|Arrow 1| B[Box 2]
    

    Of course, drawing diagrams like you’re writing a note requires knowing the syntax. But, as you can see, it’s very human-readable. You just need to study the Mermaid documentation. With a few diagrams under your belt, writing Mermaid will become second nature.

    More “drawing,” less fiddling

    Automatic positioning is a time saver

    Top to bottom flow chart in Mermaid

    When using drag-and-drop interfaces, I set out to create a visually appealing diagram. But somewhere along the way, things became messy. I got into the trap of trying to fix the diagram’s look by, for example, resizing boxes and matching font sizes. All this fiddling caused frustration because a drawing session quickly devolved into needless housekeeping.

    I understand that the freedom of drag-and-drop interfaces is that they help you create highly customized diagrams. But for standard diagrams, Mermaid does an excellent job of maintaining a clean, attractive layout. It automatically positions nodes and edges on the canvas based on the code you’ve written. No fiddling required.

    Also, as you saw in the previous section, Mermaid even simplifies choosing the direction of your diagram. We chose left to right as the direction, but if I decide later on that I want it to go from top to bottom, I don’t have to start repositioning things. A small tweak is all it takes — from LR to TD.

    flowchart LR
        A[Box 1] -->|Arrow 1| B[Box 2]
    

    With Mermaid handling all the positioning, I can focus entirely on the problem the diagram is trying to solve.

    Maintenance and updates are super quick

    Mermaid handles everything with ease

    A flowchart defining an article writing process in Mermaid

    Here’s a scenario I hate about drag-and-drop interfaces — updating them. Suppose you’re looking at a diagram you just finished designing and realize you missed a step. Now you have to delete shapes, realign elements, reposition boxes, and reconnect broken arrows to accommodate the new information.

    Code makes fixing diagrams much easier. Here’s the code for a flowchart showing the article writing process.

    flowchart TD
        A[Start] --> B[Define article topic]
        B --> C[Research sources]
        C --> D[Write first draft]
        D --> E[Publish article]
        E --> F[End]
    

    Between writing and publishing, there’s a missing step — editing. To add it, I just need to tweak the code slightly. Here is the full, fixed code.

    flowchart TD
        A[Start] --> B[Define article topic]
        B --> C[Research sources]
        C --> D[Write first draft]
        D --> X[Review and edit the draft]
        X --> E[Publish article]
        E --> F[End]
    

    With automatic positioning, everything fixes itself. Changing diagrams this way applies to more than just big changes. For instance, I can easily change nodes, edges, and text with fewer clicks by changing a few lines of code. This also makes it easier to evolve my ideas without dreading how to incorporate them into the diagram.

    I am starting to dislike drag-and-drop interfaces

    Again, don’t be put off by the coding aspects of Mermaid. There are things you can do to make it easier on yourself while you learn the syntax. For instance, you can use an AI like Gemini to generate the code, and then paste it into Mermaid’s editor. If you’re a visual person, you can sketch out the diagram first before putting it into code. If you invest time in learning and using Mermaid, you might discover a much faster way to create diagrams — just like I did.

    boxes Coding diagrams dragging faster started
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email
    Previous ArticleGoogle Pay: Save and Pay 316.1.2 APK Download by Google LLC
    Next Article How to use email to drive B2B pipeline growth
    admin
    • Website

    Related Posts

    NotebookLM just launched a major update that is everything I wanted from the app

    April 21, 2026

    Why you should buy a 2025 Razr now

    April 21, 2026

    The ‘Gun God’ Controller Turns One Plus’ New Smartphone Into a Sleek Handheld Gaming Console

    April 21, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Search Blog
    About
    About

    At WifiPortal.tech, we share simple, easy-to-follow guides on cybersecurity, online privacy, and digital opportunities. Our goal is to help everyday users browse safely, protect personal data, and explore smart ways to earn online. Whether you’re new to the digital world or looking to strengthen your online knowledge, our content is here to keep you informed and secure.

    Trending Blogs

    CISA flags new SD-WAN flaw as actively exploited in attacks

    April 21, 2026

    Amazon’s $5B Anthropic bet is really about compute, not just cash

    April 21, 2026

    Organizations Warned of Exploited Cisco, Kentico, Zimbra Vulnerabilities

    April 21, 2026

    Yelp launches AI-powered Assistant to streamline local search and bookings

    April 21, 2026
    Categories
    • Blogging (66)
    • Cybersecurity (1,426)
    • Privacy & Online Earning (175)
    • SEO & Digital Marketing (865)
    • Tech Tools & Mobile / Apps (1,712)
    • WiFi / Internet & Networking (235)

    Subscribe to Updates

    Stay updated with the latest tips on cybersecurity, online privacy, and digital opportunities straight to your inbox.

    WifiPortal.tech is a blogging platform focused on cybersecurity, online privacy, and digital opportunities. We share easy-to-follow guides, tips, and resources to help you stay safe online and explore new ways of working in the digital world.

    Our Picks

    CISA flags new SD-WAN flaw as actively exploited in attacks

    April 21, 2026

    Amazon’s $5B Anthropic bet is really about compute, not just cash

    April 21, 2026

    Organizations Warned of Exploited Cisco, Kentico, Zimbra Vulnerabilities

    April 21, 2026
    Most Popular
    • CISA flags new SD-WAN flaw as actively exploited in attacks
    • Amazon’s $5B Anthropic bet is really about compute, not just cash
    • Organizations Warned of Exploited Cisco, Kentico, Zimbra Vulnerabilities
    • Yelp launches AI-powered Assistant to streamline local search and bookings
    • NotebookLM just launched a major update that is everything I wanted from the app
    • Why you should buy a 2025 Razr now
    • CISA Adds 8 Exploited Flaws to KEV, Sets April-May 2026 Federal Deadlines
    • Authority, Freshness & First-Party Signals
    © 2026 WifiPortal.tech. Designed by WifiPortal.tech.
    • Home
    • About Us
    • Contact Us
    • Privacy Policy
    • Terms and Conditions
    • Disclaimer

    Type above and press Enter to search. Press Esc to cancel.