Frank.Blazor.Mermaid
0.2.4-preview
dotnet add package Frank.Blazor.Mermaid --version 0.2.4-preview
NuGet\Install-Package Frank.Blazor.Mermaid -Version 0.2.4-preview
<PackageReference Include="Frank.Blazor.Mermaid" Version="0.2.4-preview" />
paket add Frank.Blazor.Mermaid --version 0.2.4-preview
#r "nuget: Frank.Blazor.Mermaid, 0.2.4-preview"
// Install Frank.Blazor.Mermaid as a Cake Addin #addin nuget:?package=Frank.Blazor.Mermaid&version=0.2.4-preview&prerelease // Install Frank.Blazor.Mermaid as a Cake Tool #tool nuget:?package=Frank.Blazor.Mermaid&version=0.2.4-preview&prerelease
Frank.Blazor.Mermaid
This is a Blazor component that renders Mermaid diagrams. It is wrapper around the Blazorade.Mermaid library, which is a Blazor wrapper around the MermaidJS library.
This just exists because I wanted to use Mermaid diagrams in my Blazor projects, and I wanted to make the mermaid diagrams in between tags, and not in a separate property and then bind that property to the component.
Installation
You can install the package via NuGet.
dotnet add package Frank.Blazor.Mermaid
Usage
Add the following using statement to your _Imports.razor:
@using Frank.Blazor.Mermaid
Add the following tag to your component:
<Mermaid>
@_diagram
</Mermaid
@code {
private string _diagram = "graph TD\nA[Christmas] -->|Get money| B(Go shopping)\nB --> C{Let me think}\nC -->|One| D[Laptop]\nC -->|Two| E[iPhone]\nC -->|Three| F[fa:fa-car Car]\n";
}
or if you want write the diagram directly in the tag:
<Mermaid>
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
</Mermaid
License
This project is licensed under the MIT License - see the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Blazorade.Mermaid (>= 1.1.1)
- Microsoft.AspNetCore.Components.Web (>= 8.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.2.4-preview | 110 | 4/28/2024 |
0.2.0 | 130 | 4/27/2024 |