You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/syntax/flowchart.md
+60
Original file line number
Diff line number
Diff line change
@@ -926,6 +926,66 @@ flowchart TD
926
926
A@{ shape: tag-rect, label: "Tagged process" }
927
927
```
928
928
929
+
## Special shapes in Mermaid Flowcharts (v11.3.0+)
930
+
931
+
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.
932
+
933
+
### Icon Shape
934
+
935
+
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 provided [here](https://mermaid.js.org/syntax/architecture.html#icons). The syntax for defining an icon shape is as follows:
-**label**: The text label associated with the image. This can be any string. If not defined, no label will be displayed.
978
+
-**pos**: The position of the label. If not defined, the label will default to the bottom of the image. Possible values are:
979
+
-`t`
980
+
-`b`
981
+
-**w**: The width of the image. If not defined, this will default to the natural width of the image.
982
+
-**h**: The height of the image. If not defined, this will default to the natural height of the image.
983
+
-**constraint**: Determines if the image should constrain the node size. This setting also ensures the image maintains its original aspect ratio, adjusting the height (`h`) accordingly to the width (`w`). If not defined, this will default to `off` Possible values are:
984
+
-`on`
985
+
-`off`
986
+
987
+
These new shapes provide additional flexibility and visual appeal to your flowcharts, making them more informative and engaging.
988
+
929
989
## Links between nodes
930
990
931
991
Nodes can be connected with links/edges. It is possible to have different types of links or attach a text string to a link.
Copy file name to clipboardExpand all lines: packages/mermaid/src/docs/syntax/flowchart.md
+50
Original file line number
Diff line number
Diff line change
@@ -542,6 +542,56 @@ flowchart TD
542
542
A@{ shape: tag-rect, label: "Tagged process" }
543
543
```
544
544
545
+
## Special shapes in Mermaid Flowcharts (v11.3.0+)
546
+
547
+
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.
548
+
549
+
### Icon Shape
550
+
551
+
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 provided [here](https://mermaid.js.org/syntax/architecture.html#icons). The syntax for defining an icon shape is as follows:
-**label**: The text label associated with the image. This can be any string. If not defined, no label will be displayed.
584
+
-**pos**: The position of the label. If not defined, the label will default to the bottom of the image. Possible values are:
585
+
-`t`
586
+
-`b`
587
+
-**w**: The width of the image. If not defined, this will default to the natural width of the image.
588
+
-**h**: The height of the image. If not defined, this will default to the natural height of the image.
589
+
-**constraint**: Determines if the image should constrain the node size. This setting also ensures the image maintains its original aspect ratio, adjusting the height (`h`) accordingly to the width (`w`). If not defined, this will default to `off` Possible values are:
590
+
-`on`
591
+
-`off`
592
+
593
+
These new shapes provide additional flexibility and visual appeal to your flowcharts, making them more informative and engaging.
594
+
545
595
## Links between nodes
546
596
547
597
Nodes can be connected with links/edges. It is possible to have different types of links or attach a text string to a link.
0 commit comments