All Artifacts
All Artifacts

Mermaid Diagram Gallery

Comprehensive test gallery for mermaid diagram rendering, frame options, and theming.

A comprehensive test page for mermaid diagrams. Toggle dark mode to see theming in action. Use the copy button (top-right of each diagram) to export as Mermaid code, SVG, or PNG.

Frame Options#

Three frame styles available. Elevated adds an inner border for a mat effect.

Simple (default)

InputOutput

Elevated

InputOutput

None

InputOutput

Flowcharts#

Top-Down (TD)

YesNoStartDecisionActionSkipEnd

Left-Right (LR)

InputProcessOutputLog

With Subgraphs

ClientServerBrowserReactAPIDatabase

Sequence Diagrams#

Basic Sequence

Hello Bob!Hi Alice!How are you?Great, thanks!AliceBob

With Notes

RequestQueryResultResponseValidate inputClientServerDatabase

Async Pattern

Submit formAdd jobJob IDProcessing...ProcessCompleteUserAPIQueueWorker

State Diagrams#

Start/end nodes ([*]) should render as squares, not circles.

Simple State Machine

fetchresolverejectretryIdleLoadingSuccessError

Verify [*] nodes are squares.

Modal States

open()animation doneclose()animation doneClosedOpeningOpenClosing

Verify [*] nodes are squares.

Class Diagrams#

Component Hierarchy

BaseComponent+render+mount+unmountButton+string:label:+onClickInput+string:value:+onChange

ER Diagrams#

Database Schema

USER(no attributes)POST(no attributes)COMMENT(no attributes)TAG(no attributes)createswriteshastagged

Component Variants#

With Title & Caption

ABC
Data Flow Simple left-to-right flow showing data progression

No Copy Button

ABC

Alignment Options#

Left Aligned (align=“left”)

AB

Center Aligned (default)

AB

Right Aligned (align=“right”)

AB

Full Width (align=“full”)

ABCD

Code Fence Syntax#

Diagrams can also be written directly in MDX using code fences:

StartEnd

The rehype-mermaid plugin transforms them at build time.

Copy Button Test#

Each diagram should have a copy button in the top-right corner (visible on hover). Test all copy options work.

State Diagram (Squares)

disableenableActiveInactive

Start/end nodes should be squares, not circles.

Flowchart Copy Test

YesNoStartDecisionSuccessFailure

Test copying Mermaid source and SVG.

Sequence Diagram Copy

ClickRequestResponseUpdateUserAppAPI

Copy button should work on all diagram types.


Complex Examples#

Real-world diagrams demonstrating the system at scale.

CI/CD Pipeline#

SourceBuildDeploymainfeatureYesNoPassFailGit PushBranch?Build ImageRun TestsPass?Create PreviewNotify DevPush to RegistryDeploy StagingSmoke Tests?Deploy ProdRollback
CI/CD Pipeline Automated deployment workflow from commit to production

User Authentication Flow#

GET /loginLogin pagePOST /auth/googleRedirect to OAuthAuth consentUser approvesAuth codeExchange for tokenAccess token + user infoFind or create userUser recordSet session cookieGET /dashboardDashboardBrowserServerAuth ProviderDatabase
OAuth Authentication Google OAuth flow with session creation
Mermaid Diagram Gallery