How can I help you?
Getting Started with Blazor Kanban Component
22 May 20268 minutes to read
This guide briefly explains about how to include Syncfusion® Blazor Kanban component in a Blazor WebAssembly App using Visual Studio, Visual Studio Code, and the .NET CLI.
Ready to streamline your Syncfusion® Blazor development?
Discover the full potential of Syncfusion® Blazor components with Syncfusion® AI Coding Assistants. Effortlessly integrate, configure, and enhance your projects with intelligent, context-aware code suggestions, streamlined setups, and real-time insights—all seamlessly integrated into your preferred AI-powered IDEs like VS Code, Cursor, Syncfusion® CodeStudio and more. Explore Syncfusion® AI Coding Assistants
Prerequisites
Create a new Blazor App in Visual Studio
Create a Blazor WebAssembly App using Visual Studio via Microsoft Templates or the Syncfusion® Blazor Extension. For detailed instructions, refer to the Blazor WASM App Getting Started documentation.
Install Syncfusion® Blazor packages
Use Visual Studio’s NuGet Package Manager (Tools → NuGet Package Manager → Manage NuGet Packages for Solution) to install Syncfusion.Blazor.Kanban and Syncfusion.Blazor.Themes.
Alternatively, run the following in the Package Manager Console:
Install-Package Syncfusion.Blazor.Kanban -Version 33.2.3
Install-Package Syncfusion.Blazor.Themes -Version 33.2.3NOTE
All Syncfusion Blazor packages are available on nuget.org. See the NuGet packages topic for details.
Prerequisites
Create a new Blazor App in Visual Studio Code
Create a Blazor WebAssembly App using Visual Studio Code via Microsoft Templates or the Syncfusion® Blazor Extension. For detailed instructions, refer to the Blazor WASM App Getting Started documentation.
Alternatively, create a WebAssembly application by using the following command in the integrated terminal (Ctrl+`).
dotnet new blazorwasm -o BlazorApp
cd BlazorAppInstall Syncfusion® Blazor packages
From the integrated terminal, add the required packages of Syncfusion.Blazor.Kanban and Syncfusion.Blazor.Themes to the project:
dotnet add package Syncfusion.Blazor.Kanban --version 33.2.3
dotnet add package Syncfusion.Blazor.Themes --version 33.2.3NOTE
All Syncfusion Blazor packages are available on nuget.org. See the NuGet packages topic for details.
Prerequisites
Install the latest version of .NET SDK. If the .NET SDK is already installed, determine the installed version by running the following command in a command prompt (Windows), terminal (macOS), or command shell (Linux).
dotnet --versionCreate a Blazor WebAssembly App using .NET CLI
Run the following command to create a new Blazor WebAssembly App in a command prompt (Windows) or terminal (macOS) or command shell (Linux). For detailed instructions, refer to the Blazor WASM App Getting Started documentation.
dotnet new blazorwasm -o BlazorApp
cd BlazorAppInstall Syncfusion® Blazor packages
Run the following commands to add the packages of Syncfusion.Blazor.Kanban and Syncfusion.Blazor.Themes:
dotnet add package Syncfusion.Blazor.Kanban --version 33.2.3
dotnet add package Syncfusion.Blazor.Themes --version 33.2.3NOTE
All Syncfusion Blazor packages are available on nuget.org. See the NuGet packages topic for details.
Register Syncfusion® Blazor service
Register the Syncfusion® Blazor service in the Program.cs file of your Blazor WebAssembly App.
....
using Syncfusion.Blazor;
....
builder.Services.AddSyncfusionBlazor();
....Add stylesheet and script resources
The theme stylesheet and script can be accessed from NuGet through Static Web Assets. Include the stylesheet and script references in the ~/index.html file.
- Add the stylesheet reference inside the
<head>tag of theindex.htmlfile. - Add the script reference inside the
<body>tag of theindex.htmlfile.
<link href="_content/Syncfusion.Blazor.Themes/fluent2.css" rel="stylesheet" />
....
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>NOTE
Check out the Blazor Themes topic to discover various methods (Static Web Assets, CDN, and CRG) for referencing themes in the Blazor application. Also, check out the Adding Script Reference topic to learn different approaches for adding script references in the Blazor application.
Add Syncfusion® Blazor Kanban component
Add the Syncfusion® Blazor Kanban component in the ~/Pages/Home.razor file.
@using Syncfusion.Blazor.Kanban
<SfKanban TValue="TasksModel" KeyField="Status" DataSource="Tasks">
<KanbanColumns>
<KanbanColumn HeaderText="To Do" KeyField="@(new List<string>() {"Open"})"></KanbanColumn>
<KanbanColumn HeaderText="In Progress" KeyField="@(new List<string>() {"InProgress"})"></KanbanColumn>
<KanbanColumn HeaderText="Testing" KeyField="@(new List<string>() {"Testing"})"></KanbanColumn>
<KanbanColumn HeaderText="Done" KeyField="@(new List<string>() {"Close"})"></KanbanColumn>
</KanbanColumns>
<KanbanCardSettings HeaderField="Title" ContentField="Summary"></KanbanCardSettings>
</SfKanban>
@code {
public class TasksModel
{
public string Id { get; set; }
public string Title { get; set; }
public string Status { get; set; }
public string Summary { get; set; }
}
public List<TasksModel> Tasks = new List<TasksModel>()
{
new TasksModel { Id = "Task 1", Title = "BLAZ-29001", Status = "Open", Summary = "Analyze the new requirements gathered from the customer." },
new TasksModel { Id = "Task 2", Title = "BLAZ-29002", Status = "Open", Summary = "Show the retrieved data from the server in grid control." },
new TasksModel { Id = "Task 3", Title = "BLAZ-29003", Status = "InProgress", Summary = "Improve application performance" },
new TasksModel { Id = "Task 4", Title = "BLAZ-29004", Status = "Testing", Summary = "Fix the issues reported by the customer." },
new TasksModel { Id = "Task 5", Title = "BLAZ-29005", Status = "Testing", Summary = "Fix the issues reported in Safari browser." },
new TasksModel { Id = "Task 6", Title = "BLAZ-29006", Status = "Close", Summary = "Analyze SQL server 2008 connection." },
new TasksModel { Id = "Task 7", Title = "BLAZ-29007", Status = "Close", Summary = "Analyze grid control." },
new TasksModel { Id = "Task 8", Title = "BLAZ-29008", Status = "Close", Summary = "Stored procedure for initial data binding of the grid." }
};
}-
Using Visual Studio:
Press Ctrl + F5 (Windows) or ⌘ + F5 (macOS) to launch the application. This renders the Syncfusion® Blazor Gantt Chart component in the default web browser. -
Using Visual Studio Code / .NET CLI:
Open a terminal in the project directory and run the following command:```bash
dotnet run
NOTE
You can also explore our Blazor Kanban Board example that shows you how to render and configure the Kanban Board.