Syncfusion.Blazor.Diagram
Syncfusion® Blazor Diagram component for building interactive diagrams and flowcharts in .NET Blazor applications. Supports nodes, connectors, symbol palette, drag-and-drop, layout algorithms, serialization, and export.
Install
| Product | Versions |
|---|---|
| .NET |
README
Syncfusion Blazor Diagram
Fast and powerful diagram visualization and creation library for Blazor applications. Create flowcharts, organizational charts, mind maps, UML diagrams, and more with interactive canvas and extensive customization.

Using this package with an AI coding agent
Before generating Syncfusion code, ask your AI coding agent to run the Syncfusion setup using the following prompt:
Set up this project for Syncfusion before generating code. Fetch and follow the official instructions at https://ai.syncfusion.com, then report the detected platform, installed skill pack, MCP status, and any required licensing action.The setup detects your project's platform and loads the appropriate Syncfusion skill pack. No Syncfusion account or MCP key is required to install or read Syncfusion agent skills.
Platform reference: https://ai.syncfusion.com/blazor/llms.txt
Key features
- Diagram types: Flowcharts, organizational charts, mind maps, UML diagrams, network diagrams
- Rich shapes: Built-in and custom shapes with templates
- Connectors: Multiple connector types (straight, orthogonal, bezier) with customizable endpoints
- Editing: Drag, resize, rotate, and delete objects seamlessly
- Layout algorithms: Automatic arrangement (hierarchical, radial, organizational)
- Serialization: Save and load diagrams in JSON format
- Export: Export diagrams as image (PNG, SVG, PDF)
- Interactive features: Zoom, pan, selection, undo/redo, properties panel
- Mobile support: Touch-friendly interactions and responsive design
System requirements
- .NET 8.0 or later (Blazor Server App, Blazor Web App, Blazor WebAssembly App, Blazor Hybrid App)
- See full requirements: system requirements
Installation
Install the Diagram package and the themes package, which provides the stylesheets referenced below:
dotnet add package Syncfusion.Blazor.Diagram
dotnet add package Syncfusion.Blazor.Themes
Add stylesheet and script references
For Blazor Web App / Blazor Server App, add these to Components/App.razor or App.razor. For Blazor WebAssembly App, add these to wwwroot/index.html:
<link href="_content/Syncfusion.Blazor.Themes/fluent2.css" rel="stylesheet" />
<script src="_content/Syncfusion.Blazor.Diagram/scripts/sf-diagramcomponent.min.js" type="text/javascript"></script>
Quick start
- Register the Syncfusion Blazor service in
Program.cs:
using Syncfusion.Blazor;
builder.Services.AddSyncfusionBlazor();
- Add the Diagram component to your razor page.
@using Syncfusion.Blazor.Diagram
<SfDiagramComponent Height="600px" Nodes="@NodeCollection" Connectors="@ConnectorCollection">
</SfDiagramComponent>
@code {
public DiagramObjectCollection<Node> NodeCollection = new DiagramObjectCollection<Node>();
public DiagramObjectCollection<Connector> ConnectorCollection = new DiagramObjectCollection<Connector>();
protected override void OnInitialized()
{
// Create nodes
Node node1 = new Node() { Id = "node1", OffsetX = 250, OffsetY = 50, Width = 100, Height = 100, Shape = new FlowShape() { Type = FlowShapeType.Process }, Annotations = new DiagramObjectCollection<ShapeAnnotation>() { new ShapeAnnotation { Content = "Start" } } };
Node node2 = new Node() { Id = "node2", OffsetX = 250, OffsetY = 250, Width = 100, Height = 100, Shape = new FlowShape() { Type = FlowShapeType.Decision }, Annotations = new DiagramObjectCollection<ShapeAnnotation>() { new ShapeAnnotation { Content = "Decision" } } };
NodeCollection.Add(node1);
NodeCollection.Add(node2);
// Create connector
Connector connector = new Connector() { SourceID = "node1", TargetID = "node2", Type = ConnectorSegmentType.Orthogonal };
ConnectorCollection.Add(connector);
}
}
Documentation
- Getting Started with Blazor Web App
- Getting Started with Blazor WASM App
- API reference
- Blazor Diagram component demos
- Blazor Diagram component features overview
- Blazor Diagram component tutorial videos
Support and feedback
- For queries, reach our Syncfusion support team or post them through the community forums.
- Request new features through the Syncfusion feedback portal.
Other popular Blazor components
Explore other popular Syncfusion® blazor components curated from UI components, standalone SDKs, and document solution suites.
| UI components | Standalone UI SDK's | Document processing |
|---|---|---|
| Blazor DataGrid | Blazor Gantt Chart | Blazor DOCX Editor |
| Blazor Pivot Table | Blazor Kanban | Blazor Document |
| Blazor Map | Blazor Scheduler | Blazor PDF Viewer |
| Blazor File Manager | Blazor RichTextEditor | Blazor Spreadsheet Editor |
License
This is a commercial product and requires a paid license for possession or use. Syncfusion licensed software, including this component, is subject to the terms and conditions of the Syncfusion EULA. You can purchase a license here or start a free 30-day trial here.
About Syncfusion
Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion has more than 29,000 customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies.
Today, we provide 1800+ components and frameworks for web, mobile, and desktop development across multiple platforms:
Web: Blazor | ASP.NET Core | ASP.NET MVC | JavaScript | Angular | React | Vue
Desktop: WinForms | WPF | WinUI
Learn more at www.syncfusion.com.
[email protected] | Toll Free: 1-888-9-DOTNET
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.