toshs2k downloadsUse Font Awesome and other icon sets within your Mermaid diagrams.
![]()
This plugin for Obsidian allows you to easily use a wide variety of icons within your Mermaid diagrams.
It not only ensures that the default Font Awesome icons render correctly but also extends functionality to include other icons.
Cmd+Shift+m).To include an icon in your Mermaid diagram, use the following syntax:
fa[bklrs]?:[icon-name] for Font Awesome icons.[prefix]:[icon-name] for other custom icons.logos, lucide.You can easily insert icons using the "Insert Mermaid Icon" command:
Cmd+Shift+m (or Ctrl+Shift+m on Windows/Linux) while in the editor.Here is a simple Mermaid graph demonstrating how to use the icons:
```mermaid
graph LR
A["fa:fa-house Home"]
B["fa:fa-magnifying-glass Search"]
C["fa:fa-gear Settings"]
D["fa:fa-user-circle Profile"]
A --> B --> C --> D
```
This will render a diagram with the corresponding Font Awesome icons.
![]()
```mermaid
architecture-beta
group api(logos:aws-lambda)[API]
service db(logos:aws-aurora)[Database] in api
service disk1(logos:aws-glacier)[Storage] in api
service disk2(logos:aws-s3)[Storage] in api
service server(logos:aws-ec2)[Server] in api
db:L -- R:server
disk1:T -- B:server
disk2:T -- B:db
```
This will render a diagram with the corresponding SVG Logos Icon sets.
![]()
In the plugin settings, you can browse all supported icons under the Supported icons section.
logos, lucide).mermaid-icons.zip from the latest Releases page on GitHub.mermaid-icons folder to your Obsidian vault's plugins folder: <YourVault>/.obsidian/plugins/.This plugin enables icons in Mermaid diagrams within Obsidian by 2 ways:
Fixing Font Awesome Icons: When you use the fa:fa-icon syntax in Mermaid, it generates the corresponding HTML tag (e.g., <i class="fa fa-icon">). However, standard Obsidian does not include the Font Awesome stylesheet or font files. This plugin simply loads the necessary assets, allowing the icons to be displayed as intended.
Adding Custom Icons: To support additional icon sets (like brand logos), the plugin uses the Mermaid API to register new icon packs. This allows you to use them with a custom prefix (e.g., logos:icon-name) just like you would with the built-in Font Awesome icons.
This project itself is licensed under the MIT License. See the LICENSE file for details.
This plugin utilizes the following open-source icon sets. Thank you to their creators and contributors.
logos): Licensed under CC0 1.0 Universal.lucide): Licensed under ISC License.