@groupby/ai-dev 0.5.10 → 0.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/package.json +1 -1
  2. package/teams/fhr-neowise/commands/address-pr.md +120 -0
  3. package/teams/fhr-neowise/commands/ready-pr.md +70 -0
  4. package/teams/fhr-neowise/commands/review-pr.md +111 -0
  5. package/teams/fhr-neowise/commands/tdd-implementation.md +86 -0
  6. package/teams/fhr-neowise/commands/write-plan.md +23 -0
  7. package/teams/fhr-neowise/commands/write-pr.md +21 -0
  8. package/teams/fhr-neowise/commands/write-spec.md +25 -0
  9. package/teams/fhr-neowise/skills/agent-routing/SKILL.md +72 -0
  10. package/teams/fhr-neowise/skills/code-review/SKILL.md +83 -0
  11. package/teams/fhr-neowise/skills/code-review/review-template.md +90 -0
  12. package/teams/fhr-neowise/skills/mermaid-diagram/SKILL.md +94 -0
  13. package/teams/fhr-neowise/skills/mermaid-diagram/references/BEST_PRACTICES.md +96 -0
  14. package/teams/fhr-neowise/skills/mermaid-diagram/references/architecture.md +434 -0
  15. package/teams/fhr-neowise/skills/mermaid-diagram/references/block.md +753 -0
  16. package/teams/fhr-neowise/skills/mermaid-diagram/references/c4.md +619 -0
  17. package/teams/fhr-neowise/skills/mermaid-diagram/references/classDiagram.md +1186 -0
  18. package/teams/fhr-neowise/skills/mermaid-diagram/references/config-configuration.md +72 -0
  19. package/teams/fhr-neowise/skills/mermaid-diagram/references/config-directives.md +342 -0
  20. package/teams/fhr-neowise/skills/mermaid-diagram/references/config-layouts.md +40 -0
  21. package/teams/fhr-neowise/skills/mermaid-diagram/references/config-math.md +96 -0
  22. package/teams/fhr-neowise/skills/mermaid-diagram/references/config-theming.md +246 -0
  23. package/teams/fhr-neowise/skills/mermaid-diagram/references/config-tidy-tree.md +89 -0
  24. package/teams/fhr-neowise/skills/mermaid-diagram/references/cynefin.md +279 -0
  25. package/teams/fhr-neowise/skills/mermaid-diagram/references/entityRelationshipDiagram.md +670 -0
  26. package/teams/fhr-neowise/skills/mermaid-diagram/references/eventmodeling.md +475 -0
  27. package/teams/fhr-neowise/skills/mermaid-diagram/references/examples.md +301 -0
  28. package/teams/fhr-neowise/skills/mermaid-diagram/references/flowchart.md +2116 -0
  29. package/teams/fhr-neowise/skills/mermaid-diagram/references/gantt.md +725 -0
  30. package/teams/fhr-neowise/skills/mermaid-diagram/references/gitgraph.md +2138 -0
  31. package/teams/fhr-neowise/skills/mermaid-diagram/references/ishikawa.md +66 -0
  32. package/teams/fhr-neowise/skills/mermaid-diagram/references/kanban.md +161 -0
  33. package/teams/fhr-neowise/skills/mermaid-diagram/references/mindmap.md +335 -0
  34. package/teams/fhr-neowise/skills/mermaid-diagram/references/packet.md +153 -0
  35. package/teams/fhr-neowise/skills/mermaid-diagram/references/pie.md +93 -0
  36. package/teams/fhr-neowise/skills/mermaid-diagram/references/quadrantChart.md +267 -0
  37. package/teams/fhr-neowise/skills/mermaid-diagram/references/radar.md +269 -0
  38. package/teams/fhr-neowise/skills/mermaid-diagram/references/railroad.md +337 -0
  39. package/teams/fhr-neowise/skills/mermaid-diagram/references/requirementDiagram.md +495 -0
  40. package/teams/fhr-neowise/skills/mermaid-diagram/references/sankey.md +415 -0
  41. package/teams/fhr-neowise/skills/mermaid-diagram/references/sequenceDiagram.md +1195 -0
  42. package/teams/fhr-neowise/skills/mermaid-diagram/references/stateDiagram.md +670 -0
  43. package/teams/fhr-neowise/skills/mermaid-diagram/references/timeline.md +571 -0
  44. package/teams/fhr-neowise/skills/mermaid-diagram/references/treeView.md +321 -0
  45. package/teams/fhr-neowise/skills/mermaid-diagram/references/treemap.md +353 -0
  46. package/teams/fhr-neowise/skills/mermaid-diagram/references/userJourney.md +42 -0
  47. package/teams/fhr-neowise/skills/mermaid-diagram/references/venn.md +134 -0
  48. package/teams/fhr-neowise/skills/mermaid-diagram/references/wardley.md +732 -0
  49. package/teams/fhr-neowise/skills/mermaid-diagram/references/xyChart.md +312 -0
  50. package/teams/fhr-neowise/skills/mermaid-diagram/references/zenuml.md +474 -0
  51. package/teams/fhr-neowise/skills/mermaid-diagram/scripts/sync_docs.py +138 -0
  52. package/teams/fhr-neowise/skills/pull-request-authoring/COMPLEX.template.md +52 -0
  53. package/teams/fhr-neowise/skills/pull-request-authoring/NON-CODE.template.md +15 -0
  54. package/teams/fhr-neowise/skills/pull-request-authoring/SIMPLE.template.md +20 -0
  55. package/teams/fhr-neowise/skills/pull-request-authoring/SKILL.md +102 -0
  56. package/teams/fhr-neowise/skills/spec-investigation/SKILL.md +139 -0
  57. package/teams/fhr-neowise/skills/spec-investigation/TEMPLATE.spec.md +74 -0
  58. package/teams/fhr-neowise/skills/tdd-workflow/SKILL.md +137 -0
  59. package/teams/fhr-neowise/skills/write-plan/SKILL.md +285 -0
  60. package/teams/fhr-neowise/skills/write-plan/assets/TEMPLATE.checklist.json +79 -0
  61. package/teams/fhr-neowise/skills/write-plan/assets/TEMPLATE.plan.md +158 -0
@@ -0,0 +1,2116 @@
1
+ > **Warning**
2
+ >
3
+ > ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
4
+ >
5
+ > ## Please edit the corresponding file in [/packages/mermaid/src/docs/syntax/flowchart.md](../../packages/mermaid/src/docs/syntax/flowchart.md).
6
+
7
+ # Flowcharts - Basic Syntax
8
+
9
+ Flowcharts are composed of **nodes** (geometric shapes) and **edges** (arrows or lines). The Mermaid code defines how nodes and edges are made and accommodates different arrow types, multi-directional arrows, and any linking to and from subgraphs.
10
+
11
+ > **Warning**
12
+ > If you are using the word "end" in a Flowchart node, capitalize the entire word or any of the letters (e.g., "End" or "END"), or apply this [workaround](https://github.com/mermaid-js/mermaid/issues/1444#issuecomment-639528897). Typing "end" in all lowercase letters will break the Flowchart.
13
+
14
+ > **Warning**
15
+ > If you are using the letter "o" or "x" as the first letter in a connecting Flowchart node, add a space before the letter or capitalize the letter (e.g., "dev--- ops", "dev---Ops").
16
+ >
17
+ > Typing "A---oB" will create a [circle edge](#circle-edge-example).
18
+ >
19
+ > Typing "A---xB" will create a [cross edge](#cross-edge-example).
20
+
21
+ ### A node (default)
22
+
23
+ ```mermaid-example
24
+ ---
25
+ title: Node
26
+ ---
27
+ flowchart LR
28
+ id
29
+ ```
30
+
31
+ ```mermaid
32
+ ---
33
+ title: Node
34
+ ---
35
+ flowchart LR
36
+ id
37
+ ```
38
+
39
+ > **Note**
40
+ > The id is what is displayed in the box.
41
+
42
+ > **💡 Tip**
43
+ > Instead of `flowchart` one can also use `graph`.
44
+
45
+ ### A node with text
46
+
47
+ It is also possible to set text in the box that differs from the id. If this is done several times, it is the last text
48
+ found for the node that will be used. Also if you define edges for the node later on, you can omit text definitions. The
49
+ one previously defined will be used when rendering the box.
50
+
51
+ ```mermaid-example
52
+ ---
53
+ title: Node with text
54
+ ---
55
+ flowchart LR
56
+ id1[This is the text in the box]
57
+ ```
58
+
59
+ ```mermaid
60
+ ---
61
+ title: Node with text
62
+ ---
63
+ flowchart LR
64
+ id1[This is the text in the box]
65
+ ```
66
+
67
+ #### Unicode text
68
+
69
+ Use `"` to enclose the unicode text.
70
+
71
+ ```mermaid-example
72
+ flowchart LR
73
+ id["This ❤ Unicode"]
74
+ ```
75
+
76
+ ```mermaid
77
+ flowchart LR
78
+ id["This ❤ Unicode"]
79
+ ```
80
+
81
+ #### Markdown formatting
82
+
83
+ Use double quotes and backticks "\` text \`" to enclose the markdown text.
84
+
85
+ ```mermaid-example
86
+ ---
87
+ config:
88
+ htmlLabels: false
89
+ ---
90
+ flowchart LR
91
+ markdown["`This **is** _Markdown_`"]
92
+ newLines["`Line1
93
+ Line 2
94
+ Line 3`"]
95
+ markdown --> newLines
96
+ ```
97
+
98
+ ```mermaid
99
+ ---
100
+ config:
101
+ htmlLabels: false
102
+ ---
103
+ flowchart LR
104
+ markdown["`This **is** _Markdown_`"]
105
+ newLines["`Line1
106
+ Line 2
107
+ Line 3`"]
108
+ markdown --> newLines
109
+ ```
110
+
111
+ ### Direction
112
+
113
+ This statement declares the direction of the Flowchart.
114
+
115
+ This declares the flowchart is oriented from top to bottom (`TD` or `TB`).
116
+
117
+ ```mermaid-example
118
+ flowchart TD
119
+ Start --> Stop
120
+ ```
121
+
122
+ ```mermaid
123
+ flowchart TD
124
+ Start --> Stop
125
+ ```
126
+
127
+ This declares the flowchart is oriented from left to right (`LR`).
128
+
129
+ ```mermaid-example
130
+ flowchart LR
131
+ Start --> Stop
132
+ ```
133
+
134
+ ```mermaid
135
+ flowchart LR
136
+ Start --> Stop
137
+ ```
138
+
139
+ Possible FlowChart orientations are:
140
+
141
+ - TB - Top to bottom
142
+ - TD - Top-down/ same as top to bottom
143
+ - BT - Bottom to top
144
+ - RL - Right to left
145
+ - LR - Left to right
146
+
147
+ ## Node shapes
148
+
149
+ ### A node with round edges
150
+
151
+ ```mermaid-example
152
+ flowchart LR
153
+ id1(This is the text in the box)
154
+ ```
155
+
156
+ ```mermaid
157
+ flowchart LR
158
+ id1(This is the text in the box)
159
+ ```
160
+
161
+ ### A stadium-shaped node
162
+
163
+ ```mermaid-example
164
+ flowchart LR
165
+ id1([This is the text in the box])
166
+ ```
167
+
168
+ ```mermaid
169
+ flowchart LR
170
+ id1([This is the text in the box])
171
+ ```
172
+
173
+ ### A node in a subroutine shape
174
+
175
+ ```mermaid-example
176
+ flowchart LR
177
+ id1[[This is the text in the box]]
178
+ ```
179
+
180
+ ```mermaid
181
+ flowchart LR
182
+ id1[[This is the text in the box]]
183
+ ```
184
+
185
+ ### A node in a cylindrical shape
186
+
187
+ ```mermaid-example
188
+ flowchart LR
189
+ id1[(Database)]
190
+ ```
191
+
192
+ ```mermaid
193
+ flowchart LR
194
+ id1[(Database)]
195
+ ```
196
+
197
+ ### A node in the form of a circle
198
+
199
+ ```mermaid-example
200
+ flowchart LR
201
+ id1((This is the text in the circle))
202
+ ```
203
+
204
+ ```mermaid
205
+ flowchart LR
206
+ id1((This is the text in the circle))
207
+ ```
208
+
209
+ ### A node in an asymmetric shape
210
+
211
+ ```mermaid-example
212
+ flowchart LR
213
+ id1>This is the text in the box]
214
+ ```
215
+
216
+ ```mermaid
217
+ flowchart LR
218
+ id1>This is the text in the box]
219
+ ```
220
+
221
+ Currently only the shape above is possible and not its mirror. _This might change with future releases._
222
+
223
+ ### A node (rhombus)
224
+
225
+ ```mermaid-example
226
+ flowchart LR
227
+ id1{This is the text in the box}
228
+ ```
229
+
230
+ ```mermaid
231
+ flowchart LR
232
+ id1{This is the text in the box}
233
+ ```
234
+
235
+ ### A hexagon node
236
+
237
+ ```mermaid-example
238
+ flowchart LR
239
+ id1{{This is the text in the box}}
240
+ ```
241
+
242
+ ```mermaid
243
+ flowchart LR
244
+ id1{{This is the text in the box}}
245
+ ```
246
+
247
+ ### Parallelogram
248
+
249
+ ```mermaid-example
250
+ flowchart TD
251
+ id1[/This is the text in the box/]
252
+ ```
253
+
254
+ ```mermaid
255
+ flowchart TD
256
+ id1[/This is the text in the box/]
257
+ ```
258
+
259
+ ### Parallelogram alt
260
+
261
+ ```mermaid-example
262
+ flowchart TD
263
+ id1[\This is the text in the box\]
264
+ ```
265
+
266
+ ```mermaid
267
+ flowchart TD
268
+ id1[\This is the text in the box\]
269
+ ```
270
+
271
+ ### Trapezoid
272
+
273
+ ```mermaid-example
274
+ flowchart TD
275
+ A[/Christmas\]
276
+ ```
277
+
278
+ ```mermaid
279
+ flowchart TD
280
+ A[/Christmas\]
281
+ ```
282
+
283
+ ### Trapezoid alt
284
+
285
+ ```mermaid-example
286
+ flowchart TD
287
+ B[\Go shopping/]
288
+ ```
289
+
290
+ ```mermaid
291
+ flowchart TD
292
+ B[\Go shopping/]
293
+ ```
294
+
295
+ ### Double circle
296
+
297
+ ```mermaid-example
298
+ flowchart TD
299
+ id1(((This is the text in the circle)))
300
+ ```
301
+
302
+ ```mermaid
303
+ flowchart TD
304
+ id1(((This is the text in the circle)))
305
+ ```
306
+
307
+ ## Expanded Node Shapes in Mermaid Flowcharts (v11.3.0+)
308
+
309
+ Mermaid introduces 30 new shapes to enhance the flexibility and precision of flowchart creation. These new shapes provide more options to represent processes, decisions, events, data storage visually, and other elements within your flowcharts, improving clarity and semantic meaning.
310
+
311
+ New Syntax for Shape Definition
312
+
313
+ Mermaid now supports a general syntax for defining shape types to accommodate the growing number of shapes. This syntax allows you to assign specific shapes to nodes using a clear and flexible format:
314
+
315
+ ```
316
+ A@{ shape: rect }
317
+ ```
318
+
319
+ This syntax creates a node A as a rectangle. It renders in the same way as `A["A"]`, or `A`.
320
+
321
+ ### Complete List of New Shapes
322
+
323
+ Below is a comprehensive list of the newly introduced shapes and their corresponding semantic meanings, short names, and aliases:
324
+
325
+ | **Semantic Name** | **Shape Name** | **Short Name** | **Description** | **Alias Supported** |
326
+ | --------------------------------- | ---------------------- | -------------- | ------------------------------ | ---------------------------------------------------------------- |
327
+ | Bang | Bang | `bang` | Bang | `bang` |
328
+ | Card | Notched Rectangle | `notch-rect` | Represents a card | `card`, `notched-rectangle` |
329
+ | Cloud | Cloud | `cloud` | cloud | `cloud` |
330
+ | Collate | Hourglass | `hourglass` | Represents a collate operation | `collate`, `hourglass` |
331
+ | Com Link | Lightning Bolt | `bolt` | Communication link | `com-link`, `lightning-bolt` |
332
+ | Comment | Curly Brace | `brace` | Adds a comment | `brace-l`, `comment` |
333
+ | Comment Right | Curly Brace | `brace-r` | Adds a comment | |
334
+ | Comment with braces on both sides | Curly Braces | `braces` | Adds a comment | |
335
+ | Data Input/Output | Lean Right | `lean-r` | Represents input or output | `in-out`, `lean-right` |
336
+ | Data Input/Output | Lean Left | `lean-l` | Represents output or input | `lean-left`, `out-in` |
337
+ | Data Store | Data Store | `datastore` | Data flow diagram data store | `data-store` |
338
+ | Database | Cylinder | `cyl` | Database storage | `cylinder`, `database`, `db` |
339
+ | Decision | Diamond | `diam` | Decision-making step | `decision`, `diamond`, `question` |
340
+ | Delay | Half-Rounded Rectangle | `delay` | Represents a delay | `half-rounded-rectangle` |
341
+ | Direct Access Storage | Horizontal Cylinder | `h-cyl` | Direct access storage | `das`, `horizontal-cylinder` |
342
+ | Disk Storage | Lined Cylinder | `lin-cyl` | Disk storage | `disk`, `lined-cylinder` |
343
+ | Display | Curved Trapezoid | `curv-trap` | Represents a display | `curved-trapezoid`, `display` |
344
+ | Divided Process | Divided Rectangle | `div-rect` | Divided process shape | `div-proc`, `divided-process`, `divided-rectangle` |
345
+ | Document | Document | `doc` | Represents a document | `doc`, `document` |
346
+ | Event | Rounded Rectangle | `rounded` | Represents an event | `event` |
347
+ | Extract | Triangle | `tri` | Extraction process | `extract`, `triangle` |
348
+ | Fork/Join | Filled Rectangle | `fork` | Fork or join in process flow | `join` |
349
+ | Internal Storage | Window Pane | `win-pane` | Internal storage | `internal-storage`, `window-pane` |
350
+ | Junction | Filled Circle | `f-circ` | Junction point | `filled-circle`, `junction` |
351
+ | Lined Document | Lined Document | `lin-doc` | Lined document | `lined-document` |
352
+ | Lined/Shaded Process | Lined Rectangle | `lin-rect` | Lined process shape | `lin-proc`, `lined-process`, `lined-rectangle`, `shaded-process` |
353
+ | Loop Limit | Trapezoidal Pentagon | `notch-pent` | Loop limit step | `loop-limit`, `notched-pentagon` |
354
+ | Manual File | Flipped Triangle | `flip-tri` | Manual file operation | `flipped-triangle`, `manual-file` |
355
+ | Manual Input | Sloped Rectangle | `sl-rect` | Manual input step | `manual-input`, `sloped-rectangle` |
356
+ | Manual Operation | Trapezoid Base Top | `trap-t` | Represents a manual task | `inv-trapezoid`, `manual`, `trapezoid-top` |
357
+ | Multi-Document | Stacked Document | `docs` | Multiple documents | `documents`, `st-doc`, `stacked-document` |
358
+ | Multi-Process | Stacked Rectangle | `st-rect` | Multiple processes | `processes`, `procs`, `stacked-rectangle` |
359
+ | Odd | Odd | `odd` | Odd shape | |
360
+ | Paper Tape | Flag | `flag` | Paper tape | `paper-tape` |
361
+ | Prepare Conditional | Hexagon | `hex` | Preparation or condition step | `hexagon`, `prepare` |
362
+ | Priority Action | Trapezoid Base Bottom | `trap-b` | Priority action | `priority`, `trapezoid`, `trapezoid-bottom` |
363
+ | Process | Rectangle | `rect` | Standard process shape | `proc`, `process`, `rectangle` |
364
+ | Start | Circle | `circle` | Starting point | `circ` |
365
+ | Start | Small Circle | `sm-circ` | Small starting point | `small-circle`, `start` |
366
+ | Stop | Double Circle | `dbl-circ` | Represents a stop point | `double-circle` |
367
+ | Stop | Framed Circle | `fr-circ` | Stop point | `framed-circle`, `stop` |
368
+ | Stored Data | Bow Tie Rectangle | `bow-rect` | Stored data | `bow-tie-rectangle`, `stored-data` |
369
+ | Subprocess | Framed Rectangle | `fr-rect` | Subprocess | `framed-rectangle`, `subproc`, `subprocess`, `subroutine` |
370
+ | Summary | Crossed Circle | `cross-circ` | Summary | `crossed-circle`, `summary` |
371
+ | Tagged Document | Tagged Document | `tag-doc` | Tagged document | `tag-doc`, `tagged-document` |
372
+ | Tagged Process | Tagged Rectangle | `tag-rect` | Tagged process | `tag-proc`, `tagged-process`, `tagged-rectangle` |
373
+ | Terminal Point | Stadium | `stadium` | Terminal point | `pill`, `terminal` |
374
+ | Text Block | Text Block | `text` | Text block | |
375
+
376
+ ### Example Flowchart with New Shapes
377
+
378
+ Here’s an example flowchart that utilizes some of the newly introduced shapes:
379
+
380
+ ```mermaid-example
381
+ flowchart RL
382
+ A@{ shape: manual-file, label: "File Handling"}
383
+ B@{ shape: manual-input, label: "User Input"}
384
+ C@{ shape: docs, label: "Multiple Documents"}
385
+ D@{ shape: procs, label: "Process Automation"}
386
+ E@{ shape: paper-tape, label: "Paper Records"}
387
+ ```
388
+
389
+ ```mermaid
390
+ flowchart RL
391
+ A@{ shape: manual-file, label: "File Handling"}
392
+ B@{ shape: manual-input, label: "User Input"}
393
+ C@{ shape: docs, label: "Multiple Documents"}
394
+ D@{ shape: procs, label: "Process Automation"}
395
+ E@{ shape: paper-tape, label: "Paper Records"}
396
+ ```
397
+
398
+ ### Process
399
+
400
+ ```mermaid-example
401
+ flowchart TD
402
+ A@{ shape: rect, label: "This is a process" }
403
+ ```
404
+
405
+ ```mermaid
406
+ flowchart TD
407
+ A@{ shape: rect, label: "This is a process" }
408
+ ```
409
+
410
+ ### Event
411
+
412
+ ```mermaid-example
413
+ flowchart TD
414
+ A@{ shape: rounded, label: "This is an event" }
415
+ ```
416
+
417
+ ```mermaid
418
+ flowchart TD
419
+ A@{ shape: rounded, label: "This is an event" }
420
+ ```
421
+
422
+ ### Terminal Point (Stadium)
423
+
424
+ ```mermaid-example
425
+ flowchart TD
426
+ A@{ shape: stadium, label: "Terminal point" }
427
+ ```
428
+
429
+ ```mermaid
430
+ flowchart TD
431
+ A@{ shape: stadium, label: "Terminal point" }
432
+ ```
433
+
434
+ ### Subprocess
435
+
436
+ ```mermaid-example
437
+ flowchart TD
438
+ A@{ shape: subproc, label: "This is a subprocess" }
439
+ ```
440
+
441
+ ```mermaid
442
+ flowchart TD
443
+ A@{ shape: subproc, label: "This is a subprocess" }
444
+ ```
445
+
446
+ ### Database (Cylinder)
447
+
448
+ ```mermaid-example
449
+ flowchart TD
450
+ A@{ shape: cyl, label: "Database" }
451
+ ```
452
+
453
+ ```mermaid
454
+ flowchart TD
455
+ A@{ shape: cyl, label: "Database" }
456
+ ```
457
+
458
+ ### Start (Circle)
459
+
460
+ ```mermaid-example
461
+ flowchart TD
462
+ A@{ shape: circle, label: "Start" }
463
+ ```
464
+
465
+ ```mermaid
466
+ flowchart TD
467
+ A@{ shape: circle, label: "Start" }
468
+ ```
469
+
470
+ ### Odd
471
+
472
+ ```mermaid-example
473
+ flowchart TD
474
+ A@{ shape: odd, label: "Odd shape" }
475
+ ```
476
+
477
+ ```mermaid
478
+ flowchart TD
479
+ A@{ shape: odd, label: "Odd shape" }
480
+ ```
481
+
482
+ ### Decision (Diamond)
483
+
484
+ ```mermaid-example
485
+ flowchart TD
486
+ A@{ shape: diamond, label: "Decision" }
487
+ ```
488
+
489
+ ```mermaid
490
+ flowchart TD
491
+ A@{ shape: diamond, label: "Decision" }
492
+ ```
493
+
494
+ ### Prepare Conditional (Hexagon)
495
+
496
+ ```mermaid-example
497
+ flowchart TD
498
+ A@{ shape: hex, label: "Prepare conditional" }
499
+ ```
500
+
501
+ ```mermaid
502
+ flowchart TD
503
+ A@{ shape: hex, label: "Prepare conditional" }
504
+ ```
505
+
506
+ ### Data Input/Output (Lean Right)
507
+
508
+ ```mermaid-example
509
+ flowchart TD
510
+ A@{ shape: lean-r, label: "Input/Output" }
511
+ ```
512
+
513
+ ```mermaid
514
+ flowchart TD
515
+ A@{ shape: lean-r, label: "Input/Output" }
516
+ ```
517
+
518
+ ### Data Input/Output (Lean Left)
519
+
520
+ ```mermaid-example
521
+ flowchart TD
522
+ A@{ shape: lean-l, label: "Output/Input" }
523
+ ```
524
+
525
+ ```mermaid
526
+ flowchart TD
527
+ A@{ shape: lean-l, label: "Output/Input" }
528
+ ```
529
+
530
+ ### Datastore (Top and bottom border)
531
+
532
+ ```mermaid-example
533
+ flowchart TD
534
+ A@{ shape: datastore, label: "Datastore" }
535
+ ```
536
+
537
+ ```mermaid
538
+ flowchart TD
539
+ A@{ shape: datastore, label: "Datastore" }
540
+ ```
541
+
542
+ ### Priority Action (Trapezoid Base Bottom)
543
+
544
+ ```mermaid-example
545
+ flowchart TD
546
+ A@{ shape: trap-b, label: "Priority action" }
547
+ ```
548
+
549
+ ```mermaid
550
+ flowchart TD
551
+ A@{ shape: trap-b, label: "Priority action" }
552
+ ```
553
+
554
+ ### Manual Operation (Trapezoid Base Top)
555
+
556
+ ```mermaid-example
557
+ flowchart TD
558
+ A@{ shape: trap-t, label: "Manual operation" }
559
+ ```
560
+
561
+ ```mermaid
562
+ flowchart TD
563
+ A@{ shape: trap-t, label: "Manual operation" }
564
+ ```
565
+
566
+ ### Stop (Double Circle)
567
+
568
+ ```mermaid-example
569
+ flowchart TD
570
+ A@{ shape: dbl-circ, label: "Stop" }
571
+ ```
572
+
573
+ ```mermaid
574
+ flowchart TD
575
+ A@{ shape: dbl-circ, label: "Stop" }
576
+ ```
577
+
578
+ ### Text Block
579
+
580
+ ```mermaid-example
581
+ flowchart TD
582
+ A@{ shape: text, label: "This is a text block" }
583
+ ```
584
+
585
+ ```mermaid
586
+ flowchart TD
587
+ A@{ shape: text, label: "This is a text block" }
588
+ ```
589
+
590
+ ### Card (Notched Rectangle)
591
+
592
+ ```mermaid-example
593
+ flowchart TD
594
+ A@{ shape: notch-rect, label: "Card" }
595
+ ```
596
+
597
+ ```mermaid
598
+ flowchart TD
599
+ A@{ shape: notch-rect, label: "Card" }
600
+ ```
601
+
602
+ ### Lined/Shaded Process
603
+
604
+ ```mermaid-example
605
+ flowchart TD
606
+ A@{ shape: lin-rect, label: "Lined process" }
607
+ ```
608
+
609
+ ```mermaid
610
+ flowchart TD
611
+ A@{ shape: lin-rect, label: "Lined process" }
612
+ ```
613
+
614
+ ### Start (Small Circle)
615
+
616
+ ```mermaid-example
617
+ flowchart TD
618
+ A@{ shape: sm-circ, label: "Small start" }
619
+ ```
620
+
621
+ ```mermaid
622
+ flowchart TD
623
+ A@{ shape: sm-circ, label: "Small start" }
624
+ ```
625
+
626
+ ### Stop (Framed Circle)
627
+
628
+ ```mermaid-example
629
+ flowchart TD
630
+ A@{ shape: framed-circle, label: "Stop" }
631
+ ```
632
+
633
+ ```mermaid
634
+ flowchart TD
635
+ A@{ shape: framed-circle, label: "Stop" }
636
+ ```
637
+
638
+ ### Fork/Join (Long Rectangle)
639
+
640
+ ```mermaid-example
641
+ flowchart TD
642
+ A@{ shape: fork, label: "Fork or Join" }
643
+ ```
644
+
645
+ ```mermaid
646
+ flowchart TD
647
+ A@{ shape: fork, label: "Fork or Join" }
648
+ ```
649
+
650
+ ### Collate (Hourglass)
651
+
652
+ ```mermaid-example
653
+ flowchart TD
654
+ A@{ shape: hourglass, label: "Collate" }
655
+ ```
656
+
657
+ ```mermaid
658
+ flowchart TD
659
+ A@{ shape: hourglass, label: "Collate" }
660
+ ```
661
+
662
+ ### Comment (Curly Brace)
663
+
664
+ ```mermaid-example
665
+ flowchart TD
666
+ A@{ shape: comment, label: "Comment" }
667
+ ```
668
+
669
+ ```mermaid
670
+ flowchart TD
671
+ A@{ shape: comment, label: "Comment" }
672
+ ```
673
+
674
+ ### Comment Right (Curly Brace Right)
675
+
676
+ ```mermaid-example
677
+ flowchart TD
678
+ A@{ shape: brace-r, label: "Comment" }
679
+ ```
680
+
681
+ ```mermaid
682
+ flowchart TD
683
+ A@{ shape: brace-r, label: "Comment" }
684
+ ```
685
+
686
+ ### Comment with braces on both sides
687
+
688
+ ```mermaid-example
689
+ flowchart TD
690
+ A@{ shape: braces, label: "Comment" }
691
+ ```
692
+
693
+ ```mermaid
694
+ flowchart TD
695
+ A@{ shape: braces, label: "Comment" }
696
+ ```
697
+
698
+ ### Com Link (Lightning Bolt)
699
+
700
+ ```mermaid-example
701
+ flowchart TD
702
+ A@{ shape: bolt, label: "Communication link" }
703
+ ```
704
+
705
+ ```mermaid
706
+ flowchart TD
707
+ A@{ shape: bolt, label: "Communication link" }
708
+ ```
709
+
710
+ ### Document
711
+
712
+ ```mermaid-example
713
+ flowchart TD
714
+ A@{ shape: doc, label: "Document" }
715
+ ```
716
+
717
+ ```mermaid
718
+ flowchart TD
719
+ A@{ shape: doc, label: "Document" }
720
+ ```
721
+
722
+ ### Delay (Half-Rounded Rectangle)
723
+
724
+ ```mermaid-example
725
+ flowchart TD
726
+ A@{ shape: delay, label: "Delay" }
727
+ ```
728
+
729
+ ```mermaid
730
+ flowchart TD
731
+ A@{ shape: delay, label: "Delay" }
732
+ ```
733
+
734
+ ### Direct Access Storage (Horizontal Cylinder)
735
+
736
+ ```mermaid-example
737
+ flowchart TD
738
+ A@{ shape: das, label: "Direct access storage" }
739
+ ```
740
+
741
+ ```mermaid
742
+ flowchart TD
743
+ A@{ shape: das, label: "Direct access storage" }
744
+ ```
745
+
746
+ ### Disk Storage (Lined Cylinder)
747
+
748
+ ```mermaid-example
749
+ flowchart TD
750
+ A@{ shape: lin-cyl, label: "Disk storage" }
751
+ ```
752
+
753
+ ```mermaid
754
+ flowchart TD
755
+ A@{ shape: lin-cyl, label: "Disk storage" }
756
+ ```
757
+
758
+ ### Display (Curved Trapezoid)
759
+
760
+ ```mermaid-example
761
+ flowchart TD
762
+ A@{ shape: curv-trap, label: "Display" }
763
+ ```
764
+
765
+ ```mermaid
766
+ flowchart TD
767
+ A@{ shape: curv-trap, label: "Display" }
768
+ ```
769
+
770
+ ### Divided Process (Divided Rectangle)
771
+
772
+ ```mermaid-example
773
+ flowchart TD
774
+ A@{ shape: div-rect, label: "Divided process" }
775
+ ```
776
+
777
+ ```mermaid
778
+ flowchart TD
779
+ A@{ shape: div-rect, label: "Divided process" }
780
+ ```
781
+
782
+ ### Extract (Small Triangle)
783
+
784
+ ```mermaid-example
785
+ flowchart TD
786
+ A@{ shape: tri, label: "Extract" }
787
+ ```
788
+
789
+ ```mermaid
790
+ flowchart TD
791
+ A@{ shape: tri, label: "Extract" }
792
+ ```
793
+
794
+ ### Internal Storage (Window Pane)
795
+
796
+ ```mermaid-example
797
+ flowchart TD
798
+ A@{ shape: win-pane, label: "Internal storage" }
799
+ ```
800
+
801
+ ```mermaid
802
+ flowchart TD
803
+ A@{ shape: win-pane, label: "Internal storage" }
804
+ ```
805
+
806
+ ### Junction (Filled Circle)
807
+
808
+ ```mermaid-example
809
+ flowchart TD
810
+ A@{ shape: f-circ, label: "Junction" }
811
+ ```
812
+
813
+ ```mermaid
814
+ flowchart TD
815
+ A@{ shape: f-circ, label: "Junction" }
816
+ ```
817
+
818
+ ### Lined Document
819
+
820
+ ```mermaid-example
821
+ flowchart TD
822
+ A@{ shape: lin-doc, label: "Lined document" }
823
+ ```
824
+
825
+ ```mermaid
826
+ flowchart TD
827
+ A@{ shape: lin-doc, label: "Lined document" }
828
+ ```
829
+
830
+ ### Loop Limit (Notched Pentagon)
831
+
832
+ ```mermaid-example
833
+ flowchart TD
834
+ A@{ shape: notch-pent, label: "Loop limit" }
835
+ ```
836
+
837
+ ```mermaid
838
+ flowchart TD
839
+ A@{ shape: notch-pent, label: "Loop limit" }
840
+ ```
841
+
842
+ ### Manual File (Flipped Triangle)
843
+
844
+ ```mermaid-example
845
+ flowchart TD
846
+ A@{ shape: flip-tri, label: "Manual file" }
847
+ ```
848
+
849
+ ```mermaid
850
+ flowchart TD
851
+ A@{ shape: flip-tri, label: "Manual file" }
852
+ ```
853
+
854
+ ### Manual Input (Sloped Rectangle)
855
+
856
+ ```mermaid-example
857
+ flowchart TD
858
+ A@{ shape: sl-rect, label: "Manual input" }
859
+ ```
860
+
861
+ ```mermaid
862
+ flowchart TD
863
+ A@{ shape: sl-rect, label: "Manual input" }
864
+ ```
865
+
866
+ ### Multi-Document (Stacked Document)
867
+
868
+ ```mermaid-example
869
+ flowchart TD
870
+ A@{ shape: docs, label: "Multiple documents" }
871
+ ```
872
+
873
+ ```mermaid
874
+ flowchart TD
875
+ A@{ shape: docs, label: "Multiple documents" }
876
+ ```
877
+
878
+ ### Multi-Process (Stacked Rectangle)
879
+
880
+ ```mermaid-example
881
+ flowchart TD
882
+ A@{ shape: processes, label: "Multiple processes" }
883
+ ```
884
+
885
+ ```mermaid
886
+ flowchart TD
887
+ A@{ shape: processes, label: "Multiple processes" }
888
+ ```
889
+
890
+ ### Paper Tape (Flag)
891
+
892
+ ```mermaid-example
893
+ flowchart TD
894
+ A@{ shape: flag, label: "Paper tape" }
895
+ ```
896
+
897
+ ```mermaid
898
+ flowchart TD
899
+ A@{ shape: flag, label: "Paper tape" }
900
+ ```
901
+
902
+ ### Stored Data (Bow Tie Rectangle)
903
+
904
+ ```mermaid-example
905
+ flowchart TD
906
+ A@{ shape: bow-rect, label: "Stored data" }
907
+ ```
908
+
909
+ ```mermaid
910
+ flowchart TD
911
+ A@{ shape: bow-rect, label: "Stored data" }
912
+ ```
913
+
914
+ ### Summary (Crossed Circle)
915
+
916
+ ```mermaid-example
917
+ flowchart TD
918
+ A@{ shape: cross-circ, label: "Summary" }
919
+ ```
920
+
921
+ ```mermaid
922
+ flowchart TD
923
+ A@{ shape: cross-circ, label: "Summary" }
924
+ ```
925
+
926
+ ### Tagged Document
927
+
928
+ ```mermaid-example
929
+ flowchart TD
930
+ A@{ shape: tag-doc, label: "Tagged document" }
931
+ ```
932
+
933
+ ```mermaid
934
+ flowchart TD
935
+ A@{ shape: tag-doc, label: "Tagged document" }
936
+ ```
937
+
938
+ ### Tagged Process (Tagged Rectangle)
939
+
940
+ ```mermaid-example
941
+ flowchart TD
942
+ A@{ shape: tag-rect, label: "Tagged process" }
943
+ ```
944
+
945
+ ```mermaid
946
+ flowchart TD
947
+ A@{ shape: tag-rect, label: "Tagged process" }
948
+ ```
949
+
950
+ ## Special shapes in Mermaid Flowcharts (v11.3.0+)
951
+
952
+ Mermaid also introduces 2 special shapes to enhance your flowcharts: **icon** and **image**. These shapes allow you to include icons and images directly within your flowcharts, providing more visual context and clarity.
953
+
954
+ ### Icon Shape
955
+
956
+ You can use the `icon` shape to include an icon in your flowchart. To use icons, you need to register the icon pack first. Follow the instructions to [add custom icons](../config/icons.md). The syntax for defining an icon shape is as follows:
957
+
958
+ ```mermaid-example
959
+ flowchart TD
960
+ A@{ icon: "fa:user", form: "square", label: "User Icon", pos: "t", h: 60 }
961
+ ```
962
+
963
+ ```mermaid
964
+ flowchart TD
965
+ A@{ icon: "fa:user", form: "square", label: "User Icon", pos: "t", h: 60 }
966
+ ```
967
+
968
+ #### Parameters
969
+
970
+ - **icon**: The name of the icon from the registered icon pack.
971
+ - **form**: Specifies the background shape of the icon. If not defined there will be no background to icon. Options include:
972
+ - `square`
973
+ - `circle`
974
+ - `rounded`
975
+ - **label**: The text label associated with the icon. This can be any string. If not defined, no label will be displayed.
976
+ - **pos**: The position of the label. If not defined label will default to bottom of icon. Possible values are:
977
+ - `t`
978
+ - `b`
979
+ - **h**: The height of the icon. If not defined this will default to 48 which is minimum.
980
+
981
+ ### Image Shape
982
+
983
+ You can use the `image` shape to include an image in your flowchart. The syntax for defining an image shape is as follows:
984
+
985
+ ```
986
+ flowchart TD
987
+ A@{ img: "https://example.com/image.png", label: "Image Label", pos: "t", w: 60, h: 60, constraint: "off" }
988
+ ```
989
+
990
+ #### Parameters
991
+
992
+ - **img**: The URL of the image to be displayed.
993
+ - **label**: The text label associated with the image. This can be any string. If not defined, no label will be displayed.
994
+ - **pos**: The position of the label. If not defined, the label will default to the bottom of the image. Possible values are:
995
+ - `t`
996
+ - `b`
997
+ - **w**: The width of the image. If not defined, this will default to the natural width of the image.
998
+ - **h**: The height of the image. If not defined, this will default to the natural height of the image.
999
+ - **constraint**: Determines if the image should constrain the node size. This setting also ensures the image maintains its original aspect ratio, adjusting the width (`w`) accordingly to the height (`h`). If not defined, this will default to `off` Possible values are:
1000
+ - `on`
1001
+ - `off`
1002
+
1003
+ If you want to resize an image, but keep the same aspect ratio, set `h`, and set `constraint: on` to constrain the aspect ratio. E.g.
1004
+
1005
+ ```mermaid-example
1006
+ flowchart TD
1007
+ %% My image with a constrained aspect ratio
1008
+ A@{ img: "https://mermaid.js.org/favicon.svg", label: "My example image label", pos: "t", h: 60, constraint: "on" }
1009
+ ```
1010
+
1011
+ ```mermaid
1012
+ flowchart TD
1013
+ %% My image with a constrained aspect ratio
1014
+ A@{ img: "https://mermaid.js.org/favicon.svg", label: "My example image label", pos: "t", h: 60, constraint: "on" }
1015
+ ```
1016
+
1017
+ ## Links between nodes
1018
+
1019
+ Nodes can be connected with links/edges. It is possible to have different types of links or attach a text string to a link.
1020
+
1021
+ ### A link with arrow head
1022
+
1023
+ ```mermaid-example
1024
+ flowchart LR
1025
+ A-->B
1026
+ ```
1027
+
1028
+ ```mermaid
1029
+ flowchart LR
1030
+ A-->B
1031
+ ```
1032
+
1033
+ ### An open link
1034
+
1035
+ ```mermaid-example
1036
+ flowchart LR
1037
+ A --- B
1038
+ ```
1039
+
1040
+ ```mermaid
1041
+ flowchart LR
1042
+ A --- B
1043
+ ```
1044
+
1045
+ ### Text on links
1046
+
1047
+ ```mermaid-example
1048
+ flowchart LR
1049
+ A-- This is the text! ---B
1050
+ ```
1051
+
1052
+ ```mermaid
1053
+ flowchart LR
1054
+ A-- This is the text! ---B
1055
+ ```
1056
+
1057
+ or
1058
+
1059
+ ```mermaid-example
1060
+ flowchart LR
1061
+ A---|This is the text|B
1062
+ ```
1063
+
1064
+ ```mermaid
1065
+ flowchart LR
1066
+ A---|This is the text|B
1067
+ ```
1068
+
1069
+ ### A link with arrow head and text
1070
+
1071
+ ```mermaid-example
1072
+ flowchart LR
1073
+ A-->|text|B
1074
+ ```
1075
+
1076
+ ```mermaid
1077
+ flowchart LR
1078
+ A-->|text|B
1079
+ ```
1080
+
1081
+ or
1082
+
1083
+ ```mermaid-example
1084
+ flowchart LR
1085
+ A-- text -->B
1086
+ ```
1087
+
1088
+ ```mermaid
1089
+ flowchart LR
1090
+ A-- text -->B
1091
+ ```
1092
+
1093
+ ### Dotted link
1094
+
1095
+ ```mermaid-example
1096
+ flowchart LR
1097
+ A-.->B;
1098
+ ```
1099
+
1100
+ ```mermaid
1101
+ flowchart LR
1102
+ A-.->B;
1103
+ ```
1104
+
1105
+ ### Dotted link with text
1106
+
1107
+ ```mermaid-example
1108
+ flowchart LR
1109
+ A-. text .-> B
1110
+ ```
1111
+
1112
+ ```mermaid
1113
+ flowchart LR
1114
+ A-. text .-> B
1115
+ ```
1116
+
1117
+ ### Thick link
1118
+
1119
+ ```mermaid-example
1120
+ flowchart LR
1121
+ A ==> B
1122
+ ```
1123
+
1124
+ ```mermaid
1125
+ flowchart LR
1126
+ A ==> B
1127
+ ```
1128
+
1129
+ ### Thick link with text
1130
+
1131
+ ```mermaid-example
1132
+ flowchart LR
1133
+ A == text ==> B
1134
+ ```
1135
+
1136
+ ```mermaid
1137
+ flowchart LR
1138
+ A == text ==> B
1139
+ ```
1140
+
1141
+ ### An invisible link
1142
+
1143
+ This can be a useful tool in some instances where you want to alter the default positioning of a node.
1144
+
1145
+ ```mermaid-example
1146
+ flowchart LR
1147
+ A ~~~ B
1148
+ ```
1149
+
1150
+ ```mermaid
1151
+ flowchart LR
1152
+ A ~~~ B
1153
+ ```
1154
+
1155
+ ### Chaining of links
1156
+
1157
+ It is possible declare many links in the same line as per below:
1158
+
1159
+ ```mermaid-example
1160
+ flowchart LR
1161
+ A -- text --> B -- text2 --> C
1162
+ ```
1163
+
1164
+ ```mermaid
1165
+ flowchart LR
1166
+ A -- text --> B -- text2 --> C
1167
+ ```
1168
+
1169
+ It is also possible to declare multiple nodes links in the same line as per below:
1170
+
1171
+ ```mermaid-example
1172
+ flowchart LR
1173
+ a --> b & c--> d
1174
+ ```
1175
+
1176
+ ```mermaid
1177
+ flowchart LR
1178
+ a --> b & c--> d
1179
+ ```
1180
+
1181
+ You can then describe dependencies in a very expressive way. Like the one-liner below:
1182
+
1183
+ ```mermaid-example
1184
+ flowchart TB
1185
+ A & B--> C & D
1186
+ ```
1187
+
1188
+ ```mermaid
1189
+ flowchart TB
1190
+ A & B--> C & D
1191
+ ```
1192
+
1193
+ If you describe the same diagram using the basic syntax, it will take four lines. A
1194
+ word of warning, one could go overboard with this making the flowchart harder to read in
1195
+ markdown form. The Swedish word `lagom` comes to mind. It means, not too much and not too little.
1196
+ This goes for expressive syntaxes as well.
1197
+
1198
+ ```mermaid-example
1199
+ flowchart TB
1200
+ A --> C
1201
+ A --> D
1202
+ B --> C
1203
+ B --> D
1204
+ ```
1205
+
1206
+ ```mermaid
1207
+ flowchart TB
1208
+ A --> C
1209
+ A --> D
1210
+ B --> C
1211
+ B --> D
1212
+ ```
1213
+
1214
+ ### Attaching an ID to Edges
1215
+
1216
+ Mermaid now supports assigning IDs to edges, similar to how IDs and metadata can be attached to nodes. This feature lays the groundwork for more advanced styling, classes, and animation capabilities on edges.
1217
+
1218
+ **Syntax:**
1219
+
1220
+ To give an edge an ID, prepend the edge syntax with the ID followed by an `@` character. For example:
1221
+
1222
+ ```mermaid-example
1223
+ flowchart LR
1224
+ A e1@--> B
1225
+ ```
1226
+
1227
+ ```mermaid
1228
+ flowchart LR
1229
+ A e1@--> B
1230
+ ```
1231
+
1232
+ In this example, `e1` is the ID of the edge connecting `A` to `B`. You can then use this ID in later definitions or style statements, just like with nodes.
1233
+
1234
+ ### Turning an Animation On
1235
+
1236
+ Once you have assigned an ID to an edge, you can turn on animations for that edge by defining the edge’s properties:
1237
+
1238
+ ```mermaid-example
1239
+ flowchart LR
1240
+ A e1@==> B
1241
+ e1@{ animate: true }
1242
+ ```
1243
+
1244
+ ```mermaid
1245
+ flowchart LR
1246
+ A e1@==> B
1247
+ e1@{ animate: true }
1248
+ ```
1249
+
1250
+ This tells Mermaid that the edge `e1` should be animated.
1251
+
1252
+ ### Selecting Type of Animation
1253
+
1254
+ In the initial version, two animation speeds are supported: `fast` and `slow`. Selecting a specific animation type is a shorthand for enabling animation and setting the animation speed in one go.
1255
+
1256
+ **Examples:**
1257
+
1258
+ ```mermaid-example
1259
+ flowchart LR
1260
+ A e1@--> B
1261
+ e1@{ animation: fast }
1262
+ ```
1263
+
1264
+ ```mermaid
1265
+ flowchart LR
1266
+ A e1@--> B
1267
+ e1@{ animation: fast }
1268
+ ```
1269
+
1270
+ This is equivalent to `{ animate: true, animation: fast }`.
1271
+
1272
+ ### Using classDef Statements for Animations
1273
+
1274
+ You can also animate edges by assigning a class to them and then defining animation properties in a `classDef` statement. For example:
1275
+
1276
+ ```mermaid-example
1277
+ flowchart LR
1278
+ A e1@--> B
1279
+ classDef animate stroke-dasharray: 9,5,stroke-dashoffset: 900,animation: dash 25s linear infinite;
1280
+ class e1 animate
1281
+ ```
1282
+
1283
+ ```mermaid
1284
+ flowchart LR
1285
+ A e1@--> B
1286
+ classDef animate stroke-dasharray: 9,5,stroke-dashoffset: 900,animation: dash 25s linear infinite;
1287
+ class e1 animate
1288
+ ```
1289
+
1290
+ In this snippet:
1291
+
1292
+ - `e1@-->` creates an edge with ID `e1`.
1293
+ - `classDef animate` defines a class named `animate` with styling and animation properties.
1294
+ - `class e1 animate` applies the `animate` class to the edge `e1`.
1295
+
1296
+ **Note on Escaping Commas:**
1297
+ When setting the `stroke-dasharray` property, remember to escape commas as `\,` since commas are used as delimiters in Mermaid’s style definitions.
1298
+
1299
+ ## New arrow types
1300
+
1301
+ There are new types of arrows supported:
1302
+
1303
+ - circle edge
1304
+ - cross edge
1305
+
1306
+ ### Circle edge example
1307
+
1308
+ ```mermaid-example
1309
+ flowchart LR
1310
+ A --o B
1311
+ ```
1312
+
1313
+ ```mermaid
1314
+ flowchart LR
1315
+ A --o B
1316
+ ```
1317
+
1318
+ ### Cross edge example
1319
+
1320
+ ```mermaid-example
1321
+ flowchart LR
1322
+ A --x B
1323
+ ```
1324
+
1325
+ ```mermaid
1326
+ flowchart LR
1327
+ A --x B
1328
+ ```
1329
+
1330
+ ## Multi directional arrows
1331
+
1332
+ There is the possibility to use multidirectional arrows.
1333
+
1334
+ ```mermaid-example
1335
+ flowchart LR
1336
+ A o--o B
1337
+ B <--> C
1338
+ C x--x D
1339
+ ```
1340
+
1341
+ ```mermaid
1342
+ flowchart LR
1343
+ A o--o B
1344
+ B <--> C
1345
+ C x--x D
1346
+ ```
1347
+
1348
+ ### Minimum length of a link
1349
+
1350
+ Each node in the flowchart is ultimately assigned to a rank in the rendered
1351
+ graph, i.e. to a vertical or horizontal level (depending on the flowchart
1352
+ orientation), based on the nodes to which it is linked. By default, links
1353
+ can span any number of ranks, but you can ask for any link to be longer
1354
+ than the others by adding extra dashes in the link definition.
1355
+
1356
+ In the following example, two extra dashes are added in the link from node _B_
1357
+ to node _E_, so that it spans two more ranks than regular links:
1358
+
1359
+ ```mermaid-example
1360
+ flowchart TD
1361
+ A[Start] --> B{Is it?}
1362
+ B -->|Yes| C[OK]
1363
+ C --> D[Rethink]
1364
+ D --> B
1365
+ B ---->|No| E[End]
1366
+ ```
1367
+
1368
+ ```mermaid
1369
+ flowchart TD
1370
+ A[Start] --> B{Is it?}
1371
+ B -->|Yes| C[OK]
1372
+ C --> D[Rethink]
1373
+ D --> B
1374
+ B ---->|No| E[End]
1375
+ ```
1376
+
1377
+ > **Note** Links may still be made longer than the requested number of ranks
1378
+ > by the rendering engine to accommodate other requests.
1379
+
1380
+ When the link label is written in the middle of the link, the extra dashes must
1381
+ be added on the right side of the link. The following example is equivalent to
1382
+ the previous one:
1383
+
1384
+ ```mermaid-example
1385
+ flowchart TD
1386
+ A[Start] --> B{Is it?}
1387
+ B -- Yes --> C[OK]
1388
+ C --> D[Rethink]
1389
+ D --> B
1390
+ B -- No ----> E[End]
1391
+ ```
1392
+
1393
+ ```mermaid
1394
+ flowchart TD
1395
+ A[Start] --> B{Is it?}
1396
+ B -- Yes --> C[OK]
1397
+ C --> D[Rethink]
1398
+ D --> B
1399
+ B -- No ----> E[End]
1400
+ ```
1401
+
1402
+ For dotted or thick links, the characters to add are equals signs or dots,
1403
+ as summed up in the following table:
1404
+
1405
+ | Length | 1 | 2 | 3 |
1406
+ | ----------------- | :----: | :-----: | :------: |
1407
+ | Normal | `---` | `----` | `-----` |
1408
+ | Normal with arrow | `-->` | `--->` | `---->` |
1409
+ | Thick | `===` | `====` | `=====` |
1410
+ | Thick with arrow | `==>` | `===>` | `====>` |
1411
+ | Dotted | `-.-` | `-..-` | `-...-` |
1412
+ | Dotted with arrow | `-.->` | `-..->` | `-...->` |
1413
+
1414
+ ## Special characters that break syntax
1415
+
1416
+ It is possible to put text within quotes in order to render more troublesome characters. As in the example below:
1417
+
1418
+ ```mermaid-example
1419
+ flowchart LR
1420
+ id1["This is the (text) in the box"]
1421
+ ```
1422
+
1423
+ ```mermaid
1424
+ flowchart LR
1425
+ id1["This is the (text) in the box"]
1426
+ ```
1427
+
1428
+ ### Entity codes to escape characters
1429
+
1430
+ It is possible to escape characters using the syntax exemplified here.
1431
+
1432
+ ```mermaid-example
1433
+ flowchart LR
1434
+ A["A double quote:#quot;"] --> B["A dec char:#9829;"]
1435
+ ```
1436
+
1437
+ ```mermaid
1438
+ flowchart LR
1439
+ A["A double quote:#quot;"] --> B["A dec char:#9829;"]
1440
+ ```
1441
+
1442
+ Numbers given are base 10, so `#` can be encoded as `#35;`. It is also supported to use HTML character names.
1443
+
1444
+ ## Subgraphs
1445
+
1446
+ ```
1447
+ subgraph title
1448
+ graph definition
1449
+ end
1450
+ ```
1451
+
1452
+ An example below:
1453
+
1454
+ ```mermaid-example
1455
+ flowchart TB
1456
+ c1-->a2
1457
+ subgraph one
1458
+ a1-->a2
1459
+ end
1460
+ subgraph two
1461
+ b1-->b2
1462
+ end
1463
+ subgraph three
1464
+ c1-->c2
1465
+ end
1466
+ ```
1467
+
1468
+ ```mermaid
1469
+ flowchart TB
1470
+ c1-->a2
1471
+ subgraph one
1472
+ a1-->a2
1473
+ end
1474
+ subgraph two
1475
+ b1-->b2
1476
+ end
1477
+ subgraph three
1478
+ c1-->c2
1479
+ end
1480
+ ```
1481
+
1482
+ You can also set an explicit id for the subgraph.
1483
+
1484
+ ```mermaid-example
1485
+ flowchart TB
1486
+ c1-->a2
1487
+ subgraph ide1 [one]
1488
+ a1-->a2
1489
+ end
1490
+ ```
1491
+
1492
+ ```mermaid
1493
+ flowchart TB
1494
+ c1-->a2
1495
+ subgraph ide1 [one]
1496
+ a1-->a2
1497
+ end
1498
+ ```
1499
+
1500
+ ### flowcharts
1501
+
1502
+ With the graphtype flowchart it is also possible to set edges to and from subgraphs as in the flowchart below.
1503
+
1504
+ ```mermaid-example
1505
+ flowchart TB
1506
+ c1-->a2
1507
+ subgraph one
1508
+ a1-->a2
1509
+ end
1510
+ subgraph two
1511
+ b1-->b2
1512
+ end
1513
+ subgraph three
1514
+ c1-->c2
1515
+ end
1516
+ one --> two
1517
+ three --> two
1518
+ two --> c2
1519
+ ```
1520
+
1521
+ ```mermaid
1522
+ flowchart TB
1523
+ c1-->a2
1524
+ subgraph one
1525
+ a1-->a2
1526
+ end
1527
+ subgraph two
1528
+ b1-->b2
1529
+ end
1530
+ subgraph three
1531
+ c1-->c2
1532
+ end
1533
+ one --> two
1534
+ three --> two
1535
+ two --> c2
1536
+ ```
1537
+
1538
+ ### Direction in subgraphs
1539
+
1540
+ With the graphtype flowcharts you can use the direction statement to set the direction which the subgraph will render like in this example.
1541
+
1542
+ ```mermaid-example
1543
+ flowchart LR
1544
+ subgraph TOP
1545
+ direction TB
1546
+ subgraph B1
1547
+ direction RL
1548
+ i1 -->f1
1549
+ end
1550
+ subgraph B2
1551
+ direction BT
1552
+ i2 -->f2
1553
+ end
1554
+ end
1555
+ A --> TOP --> B
1556
+ B1 --> B2
1557
+ ```
1558
+
1559
+ ```mermaid
1560
+ flowchart LR
1561
+ subgraph TOP
1562
+ direction TB
1563
+ subgraph B1
1564
+ direction RL
1565
+ i1 -->f1
1566
+ end
1567
+ subgraph B2
1568
+ direction BT
1569
+ i2 -->f2
1570
+ end
1571
+ end
1572
+ A --> TOP --> B
1573
+ B1 --> B2
1574
+ ```
1575
+
1576
+ #### Limitation
1577
+
1578
+ If any of a subgraph's nodes are linked to the outside, subgraph direction will be ignored. Instead the subgraph will inherit the direction of the parent graph:
1579
+
1580
+ ```mermaid-example
1581
+ flowchart LR
1582
+ subgraph subgraph1
1583
+ direction TB
1584
+ top1[top] --> bottom1[bottom]
1585
+ end
1586
+ subgraph subgraph2
1587
+ direction TB
1588
+ top2[top] --> bottom2[bottom]
1589
+ end
1590
+ %% ^ These subgraphs are identical, except for the links to them:
1591
+
1592
+ %% Link *to* subgraph1: subgraph1 direction is maintained
1593
+ outside --> subgraph1
1594
+ %% Link *within* subgraph2:
1595
+ %% subgraph2 inherits the direction of the top-level graph (LR)
1596
+ outside ---> top2
1597
+ ```
1598
+
1599
+ ```mermaid
1600
+ flowchart LR
1601
+ subgraph subgraph1
1602
+ direction TB
1603
+ top1[top] --> bottom1[bottom]
1604
+ end
1605
+ subgraph subgraph2
1606
+ direction TB
1607
+ top2[top] --> bottom2[bottom]
1608
+ end
1609
+ %% ^ These subgraphs are identical, except for the links to them:
1610
+
1611
+ %% Link *to* subgraph1: subgraph1 direction is maintained
1612
+ outside --> subgraph1
1613
+ %% Link *within* subgraph2:
1614
+ %% subgraph2 inherits the direction of the top-level graph (LR)
1615
+ outside ---> top2
1616
+ ```
1617
+
1618
+ ## Markdown Strings
1619
+
1620
+ The "Markdown Strings" feature enhances flowcharts and mind maps by offering a more versatile string type, which supports text formatting options such as bold and italics, and automatically wraps text within labels.
1621
+
1622
+ ```mermaid-example
1623
+ ---
1624
+ config:
1625
+ htmlLabels: false
1626
+ ---
1627
+ flowchart LR
1628
+ subgraph "One"
1629
+ a("`The **cat**
1630
+ in the hat`") -- "edge label" --> b{{"`The **dog** in the hog`"}}
1631
+ end
1632
+ subgraph "`**Two**`"
1633
+ c("`The **cat**
1634
+ in the hat`") -- "`Bold **edge label**`" --> d("The dog in the hog")
1635
+ end
1636
+ ```
1637
+
1638
+ ```mermaid
1639
+ ---
1640
+ config:
1641
+ htmlLabels: false
1642
+ ---
1643
+ flowchart LR
1644
+ subgraph "One"
1645
+ a("`The **cat**
1646
+ in the hat`") -- "edge label" --> b{{"`The **dog** in the hog`"}}
1647
+ end
1648
+ subgraph "`**Two**`"
1649
+ c("`The **cat**
1650
+ in the hat`") -- "`Bold **edge label**`" --> d("The dog in the hog")
1651
+ end
1652
+ ```
1653
+
1654
+ Formatting:
1655
+
1656
+ - For bold text, use double asterisks (`**`) before and after the text.
1657
+ - For italics, use single asterisks (`*`) before and after the text.
1658
+ - With traditional strings, you needed to add `<br>` tags for text to wrap in nodes. However, markdown strings automatically wrap text when it becomes too long and allows you to start a new line by simply using a newline character instead of a `<br>` tag.
1659
+
1660
+ This feature is applicable to node labels, edge labels, and subgraph labels.
1661
+
1662
+ The auto wrapping can be disabled by using
1663
+
1664
+ ```
1665
+ ---
1666
+ config:
1667
+ markdownAutoWrap: false
1668
+ ---
1669
+ graph LR
1670
+ ```
1671
+
1672
+ ## Interaction
1673
+
1674
+ It is possible to bind a click event to a node, the click can lead to either a javascript callback or to a link which will be opened in a new browser tab.
1675
+
1676
+ > **Note**
1677
+ > This functionality is disabled when using `securityLevel='strict'` and enabled when using `securityLevel='loose'`.
1678
+
1679
+ ```
1680
+ click nodeId callback
1681
+ click nodeId call callback()
1682
+ ```
1683
+
1684
+ - nodeId is the id of the node
1685
+ - callback is the name of a javascript function defined on the page displaying the graph, the function will be called with the nodeId as parameter.
1686
+
1687
+ Examples of tooltip usage below:
1688
+
1689
+ ```html
1690
+ <script>
1691
+ window.callback = function () {
1692
+ alert('A callback was triggered');
1693
+ };
1694
+ </script>
1695
+ ```
1696
+
1697
+ The tooltip text is surrounded in double quotes. The styles of the tooltip are set by the class `.mermaidTooltip`.
1698
+
1699
+ ```mermaid-example
1700
+ flowchart LR
1701
+ A-->B
1702
+ B-->C
1703
+ C-->D
1704
+ click A callback "Tooltip for a callback"
1705
+ click B "https://www.github.com" "This is a tooltip for a link"
1706
+ click C call callback() "Tooltip for a callback"
1707
+ click D href "https://www.github.com" "This is a tooltip for a link"
1708
+ ```
1709
+
1710
+ ```mermaid
1711
+ flowchart LR
1712
+ A-->B
1713
+ B-->C
1714
+ C-->D
1715
+ click A callback "Tooltip for a callback"
1716
+ click B "https://www.github.com" "This is a tooltip for a link"
1717
+ click C call callback() "Tooltip for a callback"
1718
+ click D href "https://www.github.com" "This is a tooltip for a link"
1719
+ ```
1720
+
1721
+ > **Success** The tooltip functionality and the ability to link to urls are available from version 0.5.2.
1722
+
1723
+ ?> Due to limitations with how Docsify handles JavaScript callback functions, an alternate working demo for the above code can be viewed at [this jsfiddle](https://jsfiddle.net/yk4h7qou/2/).
1724
+
1725
+ Links are opened in the same browser tab/window by default. It is possible to change this by adding a link target to the click definition (`_self`, `_blank`, `_parent` and `_top` are supported):
1726
+
1727
+ ```mermaid-example
1728
+ flowchart LR
1729
+ A-->B
1730
+ B-->C
1731
+ C-->D
1732
+ D-->E
1733
+ click A "https://www.github.com" _blank
1734
+ click B "https://www.github.com" "Open this in a new tab" _blank
1735
+ click C href "https://www.github.com" _blank
1736
+ click D href "https://www.github.com" "Open this in a new tab" _blank
1737
+ ```
1738
+
1739
+ ```mermaid
1740
+ flowchart LR
1741
+ A-->B
1742
+ B-->C
1743
+ C-->D
1744
+ D-->E
1745
+ click A "https://www.github.com" _blank
1746
+ click B "https://www.github.com" "Open this in a new tab" _blank
1747
+ click C href "https://www.github.com" _blank
1748
+ click D href "https://www.github.com" "Open this in a new tab" _blank
1749
+ ```
1750
+
1751
+ Beginner's tip—a full example using interactive links in a html context:
1752
+
1753
+ ```html
1754
+ <body>
1755
+ <pre class="mermaid">
1756
+ flowchart LR
1757
+ A-->B
1758
+ B-->C
1759
+ C-->D
1760
+ click A callback "Tooltip"
1761
+ click B "https://www.github.com" "This is a link"
1762
+ click C call callback() "Tooltip"
1763
+ click D href "https://www.github.com" "This is a link"
1764
+ </pre>
1765
+
1766
+ <script>
1767
+ window.callback = function () {
1768
+ alert('A callback was triggered');
1769
+ };
1770
+ const config = {
1771
+ startOnLoad: true,
1772
+ htmlLabels: true,
1773
+ flowchart: { useMaxWidth: true, curve: 'cardinal' },
1774
+ securityLevel: 'loose',
1775
+ };
1776
+ mermaid.initialize(config);
1777
+ </script>
1778
+ </body>
1779
+ ```
1780
+
1781
+ ### Comments
1782
+
1783
+ Comments can be entered within a flow diagram, which will be ignored by the parser. Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text after the start of the comment to the next newline will be treated as a comment, including any flow syntax
1784
+
1785
+ ```mermaid-example
1786
+ flowchart LR
1787
+ %% this is a comment A -- text --> B{node}
1788
+ A -- text --> B -- text2 --> C
1789
+ ```
1790
+
1791
+ ```mermaid
1792
+ flowchart LR
1793
+ %% this is a comment A -- text --> B{node}
1794
+ A -- text --> B -- text2 --> C
1795
+ ```
1796
+
1797
+ ## Styling and classes
1798
+
1799
+ ### Styling links
1800
+
1801
+ It is possible to style links. For instance, you might want to style a link that is going backwards in the flow. As links
1802
+ have no ids in the same way as nodes, some other way of deciding what style the links should be attached to is required.
1803
+ Instead of ids, the order number of when the link was defined in the graph is used, or use default to apply to all links.
1804
+ In the example below the style defined in the linkStyle statement will belong to the fourth link in the graph:
1805
+
1806
+ ```
1807
+ linkStyle 3 stroke:#ff3,stroke-width:4px,color:red;
1808
+ ```
1809
+
1810
+ It is also possible to add style to multiple links in a single statement, by separating link numbers with commas:
1811
+
1812
+ ```
1813
+ linkStyle 1,2,7 color:blue;
1814
+ ```
1815
+
1816
+ ### Styling line curves
1817
+
1818
+ It is possible to style the type of curve used for lines between items, if the default method does not meet your needs.
1819
+ Available curve styles include `basis`, `bumpX`, `bumpY`, `cardinal`, `catmullRom`, `linear`, `monotoneX`, `monotoneY`,
1820
+ `natural`, `step`, `stepAfter`, and `stepBefore`.
1821
+
1822
+ For a full list of available curves, including an explanation of custom curves, refer to
1823
+ the [Shapes](https://d3js.org/d3-shape/curve) documentation in the [d3-shape](https://github.com/d3/d3-shape/) project.
1824
+
1825
+ Line styling can be achieved in two ways:
1826
+
1827
+ 1. Change the curve style of all the lines
1828
+ 2. Change the curve style of a particular line
1829
+
1830
+ #### Diagram level curve style
1831
+
1832
+ In this example, a left-to-right graph uses the `stepBefore` curve style:
1833
+
1834
+ ```
1835
+ ---
1836
+ config:
1837
+ flowchart:
1838
+ curve: stepBefore
1839
+ ---
1840
+ graph LR
1841
+ ```
1842
+
1843
+ #### Edge level curve style using Edge IDs (v11.10.0+)
1844
+
1845
+ You can assign IDs to [edges](#attaching-an-id-to-edges). After assigning an ID you can modify the line style by modifying the edge's `curve` property using the following syntax:
1846
+
1847
+ ```mermaid-example
1848
+ flowchart LR
1849
+ A e1@==> B
1850
+ A e2@--> C
1851
+ e1@{ curve: linear }
1852
+ e2@{ curve: natural }
1853
+ ```
1854
+
1855
+ ```mermaid
1856
+ flowchart LR
1857
+ A e1@==> B
1858
+ A e2@--> C
1859
+ e1@{ curve: linear }
1860
+ e2@{ curve: natural }
1861
+ ```
1862
+
1863
+ ```info
1864
+ Any edge curve style modified at the edge level overrides the diagram level style.
1865
+ ```
1866
+
1867
+ ```info
1868
+ If the same edge is modified multiple times the last modification will be rendered.
1869
+ ```
1870
+
1871
+ ### Styling a node
1872
+
1873
+ It is possible to apply specific styles such as a thicker border or a different background color to a node.
1874
+
1875
+ ```mermaid-example
1876
+ flowchart LR
1877
+ id1(Start)-->id2(Stop)
1878
+ style id1 fill:#f9f,stroke:#333,stroke-width:4px
1879
+ style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
1880
+ ```
1881
+
1882
+ ```mermaid
1883
+ flowchart LR
1884
+ id1(Start)-->id2(Stop)
1885
+ style id1 fill:#f9f,stroke:#333,stroke-width:4px
1886
+ style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
1887
+ ```
1888
+
1889
+ #### Classes
1890
+
1891
+ More convenient than defining the style every time is to define a class of styles and attach this class to the nodes that
1892
+ should have a different look.
1893
+
1894
+ A class definition looks like the example below:
1895
+
1896
+ ```
1897
+ classDef className fill:#f9f,stroke:#333,stroke-width:4px;
1898
+ ```
1899
+
1900
+ Also, it is possible to define style to multiple classes in one statement:
1901
+
1902
+ ```
1903
+ classDef firstClassName,secondClassName font-size:12pt;
1904
+ ```
1905
+
1906
+ Attachment of a class to a node is done as per below:
1907
+
1908
+ ```
1909
+ class nodeId1 className;
1910
+ ```
1911
+
1912
+ It is also possible to attach a class to a list of nodes in one statement:
1913
+
1914
+ ```
1915
+ class nodeId1,nodeId2 className;
1916
+ ```
1917
+
1918
+ A shorter form of adding a class is to attach the classname to the node using the `:::`operator as per below:
1919
+
1920
+ ```mermaid-example
1921
+ flowchart LR
1922
+ A:::someclass --> B
1923
+ classDef someclass fill:#f96
1924
+ ```
1925
+
1926
+ ```mermaid
1927
+ flowchart LR
1928
+ A:::someclass --> B
1929
+ classDef someclass fill:#f96
1930
+ ```
1931
+
1932
+ This form can be used when declaring multiple links between nodes:
1933
+
1934
+ ```mermaid-example
1935
+ flowchart LR
1936
+ A:::foo & B:::bar --> C:::foobar
1937
+ classDef foo stroke:#f00
1938
+ classDef bar stroke:#0f0
1939
+ classDef foobar stroke:#00f
1940
+ ```
1941
+
1942
+ ```mermaid
1943
+ flowchart LR
1944
+ A:::foo & B:::bar --> C:::foobar
1945
+ classDef foo stroke:#f00
1946
+ classDef bar stroke:#0f0
1947
+ classDef foobar stroke:#00f
1948
+ ```
1949
+
1950
+ ### CSS classes
1951
+
1952
+ > **Note:** Applying styles to Mermaid nodes via external CSS (e.g., `.cssClass > rect { fill: ... }`) does **not** work reliably. Mermaid's internal styles are injected with `!important` and scoped to the SVG element ID, giving them higher specificity than external CSS rules. External CSS will be silently overridden.
1953
+ >
1954
+ > The recommended approach is to use the `classDef` syntax shown in the [Classes](#classes) section above, which works correctly and is the intended styling mechanism.
1955
+ >
1956
+ > If external CSS is strictly required, every property must use `!important` to override Mermaid's styles — but this is not recommended.
1957
+
1958
+ **Working approach — use `classDef` instead:**
1959
+
1960
+ ```mermaid-example
1961
+ flowchart LR
1962
+ A:::myStyle --> B
1963
+ classDef myStyle fill:#ff0000,stroke:#ffff00,stroke-width:4px
1964
+ ```
1965
+
1966
+ ```mermaid
1967
+ flowchart LR
1968
+ A:::myStyle --> B
1969
+ classDef myStyle fill:#ff0000,stroke:#ffff00,stroke-width:4px
1970
+ ```
1971
+
1972
+ ### Default class
1973
+
1974
+ If a class is named default it will be assigned to all classes without specific class definitions.
1975
+
1976
+ ```
1977
+ classDef default fill:#f9f,stroke:#333,stroke-width:4px;
1978
+ ```
1979
+
1980
+ ## Basic support for fontawesome
1981
+
1982
+ It is possible to add icons from fontawesome.
1983
+
1984
+ The icons are accessed via the syntax fa:#icon class name#.
1985
+
1986
+ ```mermaid-example
1987
+ flowchart TD
1988
+ B["fa:fa-twitter for peace"]
1989
+ B-->C[fa:fa-ban forbidden]
1990
+ B-->D(fa:fa-spinner)
1991
+ B-->E(A fa:fa-camera-retro perhaps?)
1992
+ ```
1993
+
1994
+ ```mermaid
1995
+ flowchart TD
1996
+ B["fa:fa-twitter for peace"]
1997
+ B-->C[fa:fa-ban forbidden]
1998
+ B-->D(fa:fa-spinner)
1999
+ B-->E(A fa:fa-camera-retro perhaps?)
2000
+ ```
2001
+
2002
+ There are two ways to display these FontAwesome icons:
2003
+
2004
+ ### Register FontAwesome icon packs (v11.7.0+)
2005
+
2006
+ You can register your own FontAwesome icon pack following the ["Registering icon packs" instructions](../config/icons.md).
2007
+
2008
+ Supported prefixes: `fa`, `fab`, `fas`, `far`, `fal`, `fad`.
2009
+
2010
+ > **Note**
2011
+ > Note that it will fall back to FontAwesome CSS if FontAwesome packs are not registered.
2012
+
2013
+ ### Register FontAwesome CSS
2014
+
2015
+ Mermaid supports Font Awesome if the CSS is included on the website.
2016
+ Mermaid does not have any restriction on the version of Font Awesome that can be used.
2017
+
2018
+ Please refer the [Official Font Awesome Documentation](https://fontawesome.com/start) on how to include it in your website.
2019
+
2020
+ Adding this snippet in the `<head>` would add support for Font Awesome v6.5.1
2021
+
2022
+ ```html
2023
+ <link
2024
+ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
2025
+ rel="stylesheet"
2026
+ />
2027
+ ```
2028
+
2029
+ ### Custom icons
2030
+
2031
+ It is possible to use custom icons served from Font Awesome as long as the website imports the corresponding kit.
2032
+
2033
+ Note that this is currently a paid feature from Font Awesome.
2034
+
2035
+ For custom icons, you need to use the `fak` prefix.
2036
+
2037
+ **Example**
2038
+
2039
+ ```
2040
+ flowchart TD
2041
+ B[fa:fa-twitter] %% standard icon
2042
+ B-->E(fak:fa-custom-icon-name) %% custom icon
2043
+ ```
2044
+
2045
+ And trying to render it
2046
+
2047
+ ```mermaid-example
2048
+ flowchart TD
2049
+ B["fa:fa-twitter for peace"]
2050
+ B-->C["fab:fa-truck-bold a custom icon"]
2051
+ ```
2052
+
2053
+ ```mermaid
2054
+ flowchart TD
2055
+ B["fa:fa-twitter for peace"]
2056
+ B-->C["fab:fa-truck-bold a custom icon"]
2057
+ ```
2058
+
2059
+ ## Graph declarations with spaces between vertices and link and without semicolon
2060
+
2061
+ - In graph declarations, the statements also can now end without a semicolon. After release 0.2.16, ending a graph statement with semicolon is just optional. So the below graph declaration is also valid along with the old declarations of the graph.
2062
+
2063
+ - A single space is allowed between vertices and the link. However there should not be any space between a vertex and its text and a link and its text. The old syntax of graph declaration will also work and hence this new feature is optional and is introduced to improve readability.
2064
+
2065
+ Below is the new declaration of the graph edges which is also valid along with the old declaration of the graph edges.
2066
+
2067
+ ```mermaid-example
2068
+ flowchart LR
2069
+ A[Hard edge] -->|Link text| B(Round edge)
2070
+ B --> C{Decision}
2071
+ C -->|One| D[Result one]
2072
+ C -->|Two| E[Result two]
2073
+ ```
2074
+
2075
+ ```mermaid
2076
+ flowchart LR
2077
+ A[Hard edge] -->|Link text| B(Round edge)
2078
+ B --> C{Decision}
2079
+ C -->|One| D[Result one]
2080
+ C -->|Two| E[Result two]
2081
+ ```
2082
+
2083
+ ## Configuration
2084
+
2085
+ ### Renderer
2086
+
2087
+ The layout of the diagram is done with the renderer. The default renderer is dagre.
2088
+
2089
+ Starting with Mermaid version 9.4, you can use an alternate renderer named elk. The elk renderer is better for larger and/or more complex diagrams.
2090
+
2091
+ The _elk_ renderer is an experimental feature.
2092
+ You can change the renderer to elk by adding this directive:
2093
+
2094
+ ```
2095
+ config:
2096
+ flowchart:
2097
+ defaultRenderer: "elk"
2098
+ ```
2099
+
2100
+ > **Note**
2101
+ > Note that the site needs to use mermaid version 9.4+ for this to work and have this featured enabled in the lazy-loading configuration.
2102
+
2103
+ ### Width
2104
+
2105
+ It is possible to adjust the width of the rendered flowchart.
2106
+
2107
+ This is done by defining **mermaid.flowchartConfig** or by the CLI to use a JSON file with the configuration. How to use the CLI is described in the mermaidCLI page.
2108
+ mermaid.flowchartConfig can be set to a JSON string with config parameters or the corresponding object.
2109
+
2110
+ ```javascript
2111
+ mermaid.flowchartConfig = {
2112
+ width: 100%
2113
+ }
2114
+ ```
2115
+
2116
+ <!--- cspell:ignore lagom --->