Mermaid diagrams
3 min
mermaid diagrams docid\ frhb6aopndkyyjeqdejlg let you create diagrams and visualizations directly from text they are useful for documenting workflows, processes, architectures, and interactions without relying on images syntax mermaid diagrams use standard fenced code block syntax ```mermaid sequencediagram a >>b message ``` examples the following example creates a sequence diagram that illustrates an api request flow ```mermaid sequencediagram autonumber participant c as client participant a as api participant k as cache participant d as db c >>+a get /users/123 a >>+k lookup user 123 alt cache hit k >>a cached user else cache miss k >>a null a >>+d select from users where id=123 d >> a user row a >>k set user 123 end a >> c 200 ok ``` the following example creates a flowchart ```mermaid flowchart td a\[start] > b{is config valid?} b >|yes| c\[load docs] b >|no| d\[show error] c > e\[start server] e > f\[open browser] d > g\[exit] ```
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.