Skip to content
/ Mermaid Public
forked from JakeSteam/Mermaid

A collection of cheatsheets for using Mermaid diagrams on GitHub and elsewhere

License

Notifications You must be signed in to change notification settings

gsheni/Mermaid

Repository files navigation

Mermaid syntax references

A concise rewrite of the mermaid documentation for quick lookups.

Meta:

  • Overview (comments, configuring, etc)

ExampleCode
flowchart LR
    A[Start] --> B{Should you?}
    B -- Yes --> C{{Do it}}
    B -- Maybe --> D[(Save for later)]
    B -- No --> E[Okay]
Loading
flowchart LR
    A[Start] --> B{Should you?}
    B -- Yes --> C{{Do it}}
    B -- Maybe --> D[(Save for later)]
    B -- No --> E[Okay]

1: Flowchart syntax

sequenceDiagram
    Alice ->>+ Bob: Here's a message!
    Bob ->>- Alice: Hmm, ok, thanks.
Loading
sequenceDiagram
    Alice ->>+ Bob: Here's a message!
    Bob ->>- Alice: Hmm, ok, thanks.

2: Sequence diagram syntax

classDiagram
    class ClassName {
        String stringName
        Long longName
        MyDatatype attributeName

        functionName(parameter) ReturnType
        functionName2(parameter2) ReturnType
    }
    class Interface {
        Int intName
    }
    ClassName --|> Interface
Loading
classDiagram
    class ClassName {
        String stringName
        Long longName
        MyDatatype attributeName

        functionName(parameter) ReturnType
        functionName2(parameter2) ReturnType
    }
    class Interface {
        Int intName
    }
    ClassName --|> Interface

3: Class diagram syntax

4: State
5: Entity Relationship
6: User Journey
7: Gantt
8: Pie
9: Requirement
10: Others

About

A collection of cheatsheets for using Mermaid diagrams on GitHub and elsewhere

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published