Skip to content

2025-09-04

Complete Mermaid Diagram Showcase: All Chart Types

Comprehensive showcase of all Mermaid diagram types with interactive examples for flowcharts, sequence diagrams, Gantt charts, and more

Explore all Mermaid diagram types with interactive examples. Each diagram supports zoom, pan, and fullscreen viewing for optimal experience - though interactive features may vary depending on your browser and platform.

1. Flowchart - Process Flow Visualization

Flowcharts are perfect for visualizing processes, decision trees, and system flows.

Border-first (site standard): Styled nodes use a single neutral fill (#1e293b) and semantic stroke colors only—no bright per-node fills. See docs/BLOG_WRITING.md for the stroke palette and templates.

Yes

No

Start Process

Input Data

Data Valid?

Process Data

Show Error

Store in Database

Generate Output

End Process

2. Sequence Diagram - Interaction Timeline

Perfect for documenting API calls, user interactions, and system communications.

CacheDatabaseBackend APIAuth ServiceFrontendUserCacheDatabaseBackend APIAuth ServiceFrontendUseralt[Cache Hit][Cache Miss]User sees dataData synchronizedLogin Request1Authenticate(credentials)2Verify User3User Data4JWT Token5API Request + Token6Check Cache7Cached Data8Query Database9Fresh Data10Update Cache11Response Data12Display Results13

3. Class Diagram - Object-Oriented Structure

Ideal for documenting software architecture and class relationships.

inherits

inherits

extends

extends

extends

implements

implements

implements

«abstract»

Animal

#String name

#int age

#float weight

+getName() : String

+getAge() : int

+makeSound() : void

+move() : void

Mammal

-String furColor

-int pregnancyDuration

+giveBirth() : void

+produceMilk() : void

Bird

-String featherColor

-float wingspan

+fly() : void

+layEggs() : void

Dog

-String breed

-boolean trained

+bark() : void

+wagTail() : void

+fetch() : void

Cat

-String pattern

-boolean indoor

+meow() : void

+purr() : void

+scratch() : void

Eagle

-float diveSpeed

-String territory

+hunt() : void

+soar() : void

«interface»

Trainable

+train() : void

+performTrick() : void

«interface»

Playful

+play() : void

+chase() : void

«interface»

Predator

+hunt() : void

+track() : void

4. State Diagram - State Machine Visualization

Perfect for modeling state machines, lifecycle flows, and status transitions.

System Start

Start Process

Load Resources

Check Auth

Valid Token

Invalid Token

Retry

Begin Work

Continue

Success

Error

Store Results

Handle Error

Can Retry

Fatal Error

Retry Attempt

Complete

End

Idle

Initializing

Loading

Authenticating

Authorized

Unauthorized

Processing

Completed

Failed

Archiving

ErrorHandling

Retry

Terminated

Main processing loop

Can run multiple times

Error recovery logic

Determines if retry possible

5. Entity Relationship Diagram - Database Schema

Essential for database design and relationship documentation.

places

makes

contains

requires

has

includes

tracks

belongs_to

CUSTOMER

string

customer_id

PK

string

email

UK

string

name

string

phone

date

created_at

boolean

is_active

ORDER

string

order_id

PK

string

customer_id

FK

decimal

total_amount

string

status

datetime

order_date

datetime

updated_at

PAYMENT

string

payment_id

PK

string

order_id

FK

string

customer_id

FK

string

method

decimal

amount

string

status

datetime

payment_date

ORDER_ITEM

string

item_id

PK

string

order_id

FK

string

product_id

FK

int

quantity

decimal

unit_price

decimal

subtotal

SHIPPING

string

shipping_id

PK

string

order_id

FK

string

carrier

string

tracking_number

string

status

datetime

shipped_date

datetime

delivered_date

PRODUCT

string

product_id

PK

string

category_id

FK

string

name

string

description

decimal

price

string

sku

UK

boolean

is_available

INVENTORY

string

inventory_id

PK

string

product_id

FK

int

quantity_available

int

quantity_reserved

string

warehouse_location

datetime

last_updated

CATEGORY

string

category_id

PK

string

name

string

parent_id

FK

int

sort_order

6. Gantt Chart - Project Timeline

Excellent for project planning and timeline visualization.

2025-01-052025-01-122025-01-192025-01-262025-02-022025-02-092025-02-162025-02-232025-03-022025-03-092025-03-16Requirements Analysis System Design Database Design UI/UX Design Technical Spec API Development CI/CD Setup Component Development Docker Configuration Kubernetes Setup Monitoring Setup Authentication Integration Testing Backend Testing Frontend Staging Deployment User Acceptance TestingProduction Deployment Post-Launch Support PlanningBackend DevelopmentFrontend DevelopmentDevOpsDeploymentSoftware Development Project Timeline

7. Pie Chart - Data Distribution

Simple and effective for showing proportions and percentages.

28%22%18%12%10%6%4%Technology Stack Distribution in Our Projects (2025)PythonTypeScriptJavaScriptGoRustJavaOther

8. Git Graph - Version Control Flow

Visualize Git branching strategies and merge flows.

maindevelopfeature/authfeature/apihotfix/securityfeature/uiInitial commitAdd core featuresSetup development environmentAdd authenticationAdd JWT tokensCreate REST APIAdd validationv1.0.0Fix security issuev1.0.1Continue developmentAdd UI componentsImprove stylingv1.1.0

9. User Journey - Customer Experience Mapping

Map out user experiences and customer journeys.

Customer
Discovery
Discovery
Customer
Visit Homepage
Visit Homepage
Customer
Browse Products
Browse Products
Customer
Read Reviews
Read Reviews
Customer
Compare Prices
Compare Prices
Selection
Selection
Customer
Add to Cart
Add to Cart
Customer
Apply Coupon
Apply Coupon
Customer
Calculate Shipping
Calculate Shipping
Checkout
Checkout
Customer
Enter Details
Enter Details
Customer
Select Payment
Select Payment
Customer
Confirm Order
Confirm Order
Fulfillment
Fulfillment
Customer
Receive Confirmation
Receive Confirmation
Customer
Track Package
Track Package
Customer
Receive Product
Receive Product
Post-Purchase
Post-Purchase
Customer
Unbox Product
Unbox Product
Customer
Test Product
Test Product
Customer
Leave Review
Leave Review
Customer
Recommend Friends
Recommend Friends
Customer Shopping Journey

10. Quadrant Chart - Priority Matrix

Useful for prioritization and decision making.

We should expandNeed to promoteRe-evaluateMay be improvedCampaign FCampaign ECampaign DCampaign CCampaign BCampaign ALow ReachHigh ReachLow EngagementHigh EngagementReach and engagement of campaigns

11. Mind Map - Concept Organization

Great for brainstorming and organizing hierarchical information.

Software Architecture

Frontend

React

Components

Hooks

State Management

Vue

Composition API

Vuex

Nuxt

Angular

Services

Modules

RxJS

Backend

Node.js

Express

NestJS

Fastify

Python

Django

FastAPI

Flask

Go

Gin

Echo

Fiber

Database

SQL

PostgreSQL

MySQL

SQLite

NoSQL

MongoDB

Redis

DynamoDB

Graph

Neo4j

ArangoDB

DevOps

CI/CD

GitHub Actions

Jenkins

GitLab CI

Containers

Docker

Kubernetes

Podman

Cloud

AWS

Azure

GCP

12. Timeline - Historical Events

Document chronological events and milestones.

Early Web1991HTML CreatedFirst Website1993Mosaic Browser1995JavaScript BornPHP Released1996CSS 1.0Flash IntroducedWeb 2.0 Era2004Firefox 1.0Web 2.0 TermCoined2005AJAX PopularizedYouTube Launched2006jQuery Released2008Chrome BrowserGitHub FoundedModern Web2009Node.js Created2010AngularJSResponsive Design2013React Released2014Vue.js BornHTML5 Standard2015ES6/ES2015HTTP/2Current Era2019WebAssembly 1.02020Deno ReleasedRemote Work Boom2021Web3 Hype2023AI IntegrationChatGPT Era2024AI-PoweredDevelopment2025Future of WebEvolution of Web Technologies

13. Requirement Diagram - System Requirements

Document system requirements and their relationships.

<<satisfies>>

<<traces>>

<<contains>>

<<contains>>

<<derives>>

<<refines>>

<<verifies>>

<<copies>>

<<Requirement>>

test_req

ID: 1

Text: the test text.

Risk: High

Verification: Test

<<Functional Requirement>>

test_req2

ID: 1.1

Text: the second test text.

Risk: Low

Verification: Inspection

<<Performance Requirement>>

test_req3

ID: 1.2

Text: the third test text.

Risk: Medium

Verification: Demonstration

<<Interface Requirement>>

test_req4

ID: 1.2.1

Text: the fourth test text.

Risk: Medium

Verification: Analysis

<<Physical Requirement>>

test_req5

ID: 1.2.2

Text: the fifth test text.

Risk: Medium

Verification: Analysis

<<Design Constraint>>

test_req6

ID: 1.2.3

Text: the sixth test text.

Risk: Medium

Verification: Analysis

<<Element>>

test_entity

Type: simulation

<<Element>>

test_entity2

Type: word doc

Doc Ref: reqs/test_entity

<<Element>>

test_entity3

Type: test suite

Doc Ref: github.com/all_the_tests

Tips for Using Mermaid Diagrams

Interactive Features

  • Zoom: Use mouse wheel or pinch gesture (availability depends on browser support)
  • Pan: Click and drag to move around (may vary on touch devices)
  • Fullscreen: Click the expand button for detailed view (platform-dependent)
  • Reset: Return to original view with reset button
  • Accessibility: Most interactive features work with keyboard navigation, though experience may vary across different assistive technologies

Best Practices

  1. Keep diagrams focused and not too complex
  2. Use colors strategically to highlight important elements
  3. Add notes and labels for clarity
  4. Test on mobile devices for responsiveness
  5. Consider breaking large diagrams into smaller ones

When to Use Each Diagram Type

  • Flowchart: Process flows, decision trees
  • Sequence: API interactions, user flows
  • Class: Software architecture, OOP design
  • State: State machines, status flows
  • ER: Database schemas, data relationships
  • Gantt: Project timelines, scheduling
  • Pie: Data distribution, percentages
  • Git: Version control strategies
  • Journey: User experience mapping
  • Quadrant: Priority matrices, comparisons
  • Mind Map: Brainstorming, concept organization
  • Timeline: Historical events, roadmaps
  • Requirement: System specifications

Related posts