Soenneker.Blazor.Drawflow 4.0.559

Prefix Reserved
dotnet add package Soenneker.Blazor.Drawflow --version 4.0.559
                    
NuGet\Install-Package Soenneker.Blazor.Drawflow -Version 4.0.559
                    
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="4.0.559" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blazor.Drawflow" Version="4.0.559" />
                    
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 4.0.559
                    
#r "nuget: Soenneker.Blazor.Drawflow, 4.0.559"
                    
#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.
#:package Soenneker.Blazor.Drawflow@4.0.559
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Blazor.Drawflow&version=4.0.559
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blazor.Drawflow&version=4.0.559
                    
Install as a Cake Tool

NuGet alternate text is missing from this package README image Build Status NuGet Downloads alternate text is missing from this package README image

Soenneker.Blazor.Drawflow

A Blazor component and interop API for building editable, node-based diagrams with Drawflow.

Drawflow editor

Installation

dotnet add package Soenneker.Blazor.Drawflow

Setup

Register the interop service in Program.cs:

using Soenneker.Blazor.Drawflow.Registrars;

builder.Services.AddDrawflowInteropAsScoped();

Add the component namespace to _Imports.razor:

@using Soenneker.Blazor.Drawflow
@using Soenneker.Blazor.Drawflow.Options

Create an editor

Give the component an explicit height; Drawflow needs a sized container to render a usable canvas.

<Drawflow @ref="_flow"
          Options="_options"
          OnNodeSelected="HandleSelection"
          style="height: 32rem; width: 100%;" />

@code {
    private Drawflow? _flow;

    private readonly DrawflowOptions _options = new()
    {
        Reroute = true,
        ZoomMin = 0.4,
        ZoomMax = 1.8,
        UseUuid = true
    };

    private Task HandleSelection(List<string> nodeIds)
    {
        // nodeIds contains the current selection reported by Drawflow.
        return Task.CompletedTask;
    }
}

The editor is created after its first render. Call methods through the component reference from a user action or after the parent component has rendered—not during OnInitialized{Async}.

Add nodes and connections

await _flow!.AddNode(
    name: "source",
    inputs: 0,
    outputs: 1,
    posX: 80,
    posY: 120,
    className: "source-node",
    data: new { endpoint = "/orders" },
    html: "<strong>Orders</strong>");

await _flow.AddNode(
    name: "processor",
    inputs: 1,
    outputs: 0,
    posX: 360,
    posY: 120,
    className: "processor-node",
    data: null,
    html: "<strong>Process order</strong>");

string sourceId = (await _flow.GetNodesFromName("source")).Single();
string processorId = (await _flow.GetNodesFromName("processor")).Single();

await _flow.AddConnection(sourceId, processorId, "output_1", "input_1");

Node HTML is inserted into the page by Drawflow. Never pass unsanitized user content to AddNode, SetNodeHtml, or imported flow data.

Save and restore a flow

string json = await _flow!.ExportAsJson();
await _flow.Import(json);

Use Export() and Import(DrawflowExport) when you prefer the models from Soenneker.Blazor.Drawflow.Dtos. Treat imported JSON as untrusted input: validate its size and contents before rendering it.

Events

The component exposes callbacks for node, connection, module, selection, data, zoom, reroute, translation, import, and export events. OnNodeSelected and OnNodeUnselected provide List<string> values. The other callbacks expose Drawflow's JavaScript arguments as a JSON array in a string, so deserialize the payload according to the event you subscribe to.

Asset loading

Drawflow's pinned JavaScript and CSS are loaded from jsDelivr by default with integrity checks. Set UseCdn = false to use the copies packaged with the NuGet package. Use the same setting for every Drawflow component in a scoped session because the shared assets are initialized once.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
4.0.559 58 9/17/2026
4.0.558 51 9/16/2026
4.0.557 46 9/16/2026
4.0.556 43 9/16/2026
4.0.555 47 9/16/2026
4.0.554 59 9/16/2026
4.0.553 67 9/15/2026
4.0.552 75 9/15/2026
4.0.551 96 9/14/2026
4.0.550 91 9/13/2026
4.0.549 84 9/13/2026
4.0.548 87 9/13/2026
4.0.547 89 9/13/2026
4.0.546 89 9/13/2026
4.0.545 92 9/13/2026
4.0.542 86 9/12/2026
4.0.541 95 9/12/2026
4.0.540 84 9/12/2026
4.0.538 87 9/10/2026
4.0.537 91 9/10/2026
Loading failed

Updated Multiple NuGet packages