Soenneker.Blazor.Drawflow 3.0.8

Prefix Reserved
dotnet add package Soenneker.Blazor.Drawflow --version 3.0.8
                    
NuGet\Install-Package Soenneker.Blazor.Drawflow -Version 3.0.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Blazor.Drawflow" Version="3.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blazor.Drawflow" Version="3.0.8" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Blazor.Drawflow" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Blazor.Drawflow --version 3.0.8
                    
#r "nuget: Soenneker.Blazor.Drawflow, 3.0.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Soenneker.Blazor.Drawflow&version=3.0.8
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blazor.Drawflow&version=3.0.8
                    
Install as a Cake Tool

NuGet Build Status NuGet Downloads

alternate text is missing from this package README image Soenneker.Blazor.Drawflow

Soenneker.Blazor.Drawflow is a lightweight, modern Blazor wrapper for drawflow.js, enabling interactive node-based diagrams in your Blazor applications. It supports advanced features like modules, zoom, import/export, and full event handling.

Demo

image

Features

  • Node and Connection Management: Add, remove, and update nodes and connections programmatically.
  • Modules: Organize nodes into modules and switch between them.
  • Zoom & Pan: Built-in zoom controls and canvas panning.
  • Import/Export: Serialize and restore flows as JSON.
  • Event Handling: Subscribe to all major events (node created, removed, selected, data changed, etc).
  • Customizable: Pass options to control rerouting, curvature, zoom limits, and more.
  • CDN or Local Assets: Load drawflow.js and CSS from CDN or local files.

Installation

dotnet add package Soenneker.Blazor.Drawflow

Quick Start

  1. Register Services (in Program.cs):
builder.Services.AddDrawflowInteropAsScoped();
  1. Add the Component (in your .razor file):
<Drawflow @ref="Flow" Options="_options" OnNodeCreated="HandleNodeCreated" style="height:400px"></Drawflow>

@code {
    private Drawflow? Flow;
    private readonly DrawflowOptions _options = new();

    private Task HandleNodeCreated(string id)
    {
        Console.WriteLine($"Node created {id}");
        return Task.CompletedTask;
    }
}

Event Callbacks

<Drawflow
    @ref="Flow"
    Options="_options"
    OnNodeCreated="HandleNodeCreated"
    OnNodeRemoved="HandleNodeRemoved"
    OnConnectionCreated="HandleConnectionCreated"
    OnDataChanged="HandleDataChanged"
    ... />

Programmatic API

await Flow.AddNode("github", 1, 1, 150, 150, "github", new { name = "GitHub" }, "<div>GitHub</div>");
await Flow.AddConnection("github", "slack", "output", "input");
await Flow.ZoomIn();
await Flow.Export();

Options

var options = new DrawflowOptions {
    Reroute = true,
    Curvature = 0.3,
    Zoom = 1.0,
    ZoomMax = 2.0,
    ZoomMin = 0.3,
    DraggableInputs = true,
    UseUuid = true,
    ManualCreate = false // auto-create on render
};
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
3.0.8 1 7/3/2025
3.0.7 3 7/3/2025
3.0.6 10 7/3/2025
3.0.5 14 7/1/2025
3.0.4 9 7/1/2025
3.0.3 12 7/1/2025
3.0.1 11 6/30/2025