Evaluate the Diagram SDK free.Start building today.
Add the Diagram SDK to your app.
Use a package manager to add the Diagram SDK to your application now, or download Syncfusion Studio to browse samples and binaries on your desktop.
Follow these steps to integrate the Blazor Diagram component into an existing Blazor Web App using the Interactive Server render mode.
Install NuGet Packages
Install the required NuGet packages using the Package Manager Console (PMC)
Install-Package Syncfusion.Blazor.Diagram Install-Package Syncfusion.Blazor.Themes
Register Syncfusion® Blazor Service
Register the Syncfusion Blazor service in the Program.cs file and include the required namespace reference using Syncfusion.Blazor;.
builder.Services.AddSyncfusionBlazor();
Register Syncfusion license key
Register the Syncfusion license key in the Program.cs file after the AddSyncfusionBlazor() call.
// Register the Syncfusion license
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");
Add Theme Stylesheet and Script
Add the Syncfusion theme stylesheet at the end of the <head> section in the Components/App.razor file to apply styling.
<link href="_content/Syncfusion.Blazor.Themes/fluent2.css" rel="stylesheet" />
Add Syncfusion® Blazor Diagram component
Add the Syncfusion® Blazor Diagram component in the ~/Components/Pages/Home.razor.
@rendermode InteractiveServer
@using Syncfusion.Blazor.Diagram
<SfDiagramComponent @ref="diagram" Width="100%" Height="600px" Nodes="@nodes" Connectors="@connectors" NodeCreating="@NodeCreating" Created="OnCreated"/>
@code {
private SfDiagramComponent diagram;
private DiagramObjectCollection<Node> nodes = new()
{
new() { ID = "node1", OffsetX = 300, OffsetY = 100, Shape = new FlowShape { Type = NodeShapes.Flow, Shape = NodeFlowShapes.Terminator }, Annotations = new() { new() { Content = "Start" } } },
new() { ID = "node2", OffsetX = 300, OffsetY = 200, Shape = new FlowShape { Type = NodeShapes.Flow, Shape = NodeFlowShapes.Process }, Annotations = new() { new() { Content = "Process" } } },
new() { ID = "node3", OffsetX = 300, OffsetY = 300, Shape = new FlowShape { Type = NodeShapes.Flow, Shape = NodeFlowShapes.Decision }, Annotations = new() { new() { Content = "Decision?" } } },
new() { ID = "node4", OffsetX = 300, OffsetY = 400, Shape = new FlowShape { Type = NodeShapes.Flow, Shape = NodeFlowShapes.Terminator }, Annotations = new() { new() { Content = "End" } } }
};
private DiagramObjectCollection<Connector> connectors = new()
{
new() { ID="connector1", SourceID="node1", TargetID="node2" },
new() { ID="connector2", SourceID="node2", TargetID="node3" },
new() { ID="connector3", SourceID="node3", TargetID="node4" }
};
private static void NodeCreating(IDiagramObject obj)
{
if (obj is Node node)
(node.Width, node.Height, node.Style) = (140, 50, new() { Fill="#E8F4FF", StrokeColor="#357BD2" });
}
private void OnCreated()
{
diagram.FitToPage(new FitOptions() { Region = DiagramRegion.Content });
}
}
Search a control. Copy its install command.
Search 245 controls across 14 platforms. Each command comes from that control’s getting-started guide, and every package is checked on NuGet, npm, or pub.dev.
Loading controls…
Evaluate faster with your coding agent.
Paste this prompt into GitHub Copilot, Claude Code, Cursor, or any agent. It sets up Syncfusion for your project from ai.syncfusion.com before it writes code.
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 skills, MCP status, and any required licensing action.
No key needed to install the skills. The MCP servers use the API key that comes with a free account. Agent setup guides
AI assistants
IDEs
Short, task-first walkthroughs.
Need help getting started?
Explore our resources or reach out to our support team for assistance.
Product Updates
Technical Support
AI Solutions
Syncfusion Studio for your desktop.
One small download. Browse every product, download samples and binaries, and set up your IDE and AI assistant.