We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The Blazor TreeView is a UI component that displays hierarchical data, such as a table of contents, code examples, and file directories, in a tree structure. TreeView is provided with features, including data binding, on-demand loading, multi-selection, drag and drop, node editing, checkboxes, templates, and more, compatible with both Blazor WebAssembly (WASM) and Blazor Server apps.


Why choose Syncfusion Blazor TreeView?

A high performance Blazor TreeView.

High performance

Load on demand (lazy load) is enabled by default to reduce bandwidth usage when consuming large amounts of data. Only first-level nodes are loaded initially, and then child nodes are loaded when their parent node is expanded.

Blazor TreeView seamless data binding.

Seamless data binding

Bind data to the TreeView component from any valid data source in JSON format. The tree data can be local or remote and retrieved via various adapters, such as OData, OData V4, URL, JSON, and web API.

Blazor TreeView resolution.

Adapts to any resolution

TreeView has a highly responsive layout and an optimized design for desktops, touchscreens, and phones. It works well on all mobile phones that use iOS, Android, or Windows OS.

Blazor TreeView template designs.

Create your own template designs

It can be customized via node template support, which allows you to design a custom structure for tree nodes. Node templates can be used for parent nodes, child nodes, or both, and can include images and any custom element structure.

Blazor TreeView hierarchical data.

Visualize hierarchical data

The Blazor TreeView is a graphic user interface element that displays hierarchical data as a tree structure. It can be populated with nested arrays of JSON objects from a hierarchical data source.

Blazor TreeView customizable themes.

Attractive, customizable themes

Cutting-edge design with several built-in themes, such as Fluent, Tailwind CSS, Bootstrap, Material, and Fabric. Utilize the online Theme Studio tool to customize themes of TreeView easily.

Blazor TreeView globalization and localization.

Globalization and localization

Enable users from different locales to use the component by formatting dates, currency, and numbering to suit preferences.


Blazor TreeView Code Example

Easily get started with the Blazor TreeView using a few simple lines of C# code example as demonstrated below, Also explore our Blazor TreeView Example that shows you how to render the TreeView component in Blazor.

Edit in Blazor Playground

@using Syncfusion.Blazor.Navigations
<SfTreeView TValue="MailItem">
<TreeViewFieldsSettings TValue="MailItem" Id="Id" DataSource="@MyFolder" Text="FolderName" ParentID="ParentId" HasChildren="HasSubFolders" Expanded="Expanded"></TreeViewFieldsSettings>
</SfTreeView>

@code{
public class MailItem
{
    public string Id { get; set; }
    public string ParentId { get; set; }
    public string FolderName { get; set; }
    public bool Expanded { get; set; }
    public bool HasSubFolders { get; set; }
}
List<MailItem> MyFolder = new List<MailItem>();
protected override void OnInitialized()
{
    base.OnInitialized();
    MyFolder.Add(new MailItem
    {
        Id = "1",
        FolderName = "Inbox",
        HasSubFolders = true,
        Expanded = true
    });
    MyFolder.Add(new MailItem
    {
        Id = "2",
        ParentId = "1",
        FolderName = "Categories",
        Expanded = true,
        HasSubFolders = true
    });
    MyFolder.Add(new MailItem
    {
        Id = "3",
        ParentId = "2",
        FolderName = "Primary"
    });
    MyFolder.Add(new MailItem
    {
        Id = "4",
        ParentId = "2",
        FolderName = "Social"
    });
    MyFolder.Add(new MailItem
    {
        Id = "5",
        ParentId = "2",
        FolderName = "Promotions"
    });
}
}

Blazor TreeView virtualization

The Blazor TreeView supports UI virtualization to optimize the performance when dealing with large data sets. This will render only nodes based on the TreeView height and swap the nodes when users scroll avoiding rendering of off-screen items.

Blazor TreeView Virtualization.


Display nodes with icons in Blazor TreeView.

Tree node with icons and images

Display nodes with labels and icons or images to present content in a more readable format. This is helpful in making a typical directory tree and file system.


Check box support

Built-in support for check boxes allows users to select more than one item. The Blazor TreeView check boxes also have a tri-state mode that is applicable only for parent nodes. In this mode, the parent node will go into an indeterminate state when the child nodes are partially checked.

Blazor TreeView checkbox support.


Drag and drop

In Blazor TreeView, Nodes can be dragged and dropped at all levels of the same TreeView.

Blazor TreeView component drag and drop inside a tree.

Inside the tree

Tree nodes can be dragged and dropped from one parent node to another within the same level or different levels.

Blazor TreeView component drag and drop between trees.

Outside the tree

Extending the drop behavior allows users to drop tree nodes from one TreeView to another TreeView.

Blazor TreeView component dragging and dropping to external container.

To an external container

Drop tree nodes to any external container or component by extending the TreeView node drop action.


Multiple node selection

Blazor TreeView allows users to select multiple nodes. When the drag-and-drop feature is enabled, all the selected nodes can be dragged at the same time.

Blazor TreeView multiple node selection.

Blazor TreeView multiple node drag and drop.


Blazor TreeView editable nodes.

Editable nodes

Edit the tree nodes’ label text on the client side by double-clicking it. While editing TreeView nodes, the TreeView data source will also be updated by the modified data.


Sorting tree nodes

Render the tree view nodes in ascending or descending order based on the label text to provide users improved readability.

Blazor TreeView Sorting tree nodes.


Blazor TreeView node template.

Node template

Customize the TreeView using the node template support to define a custom structure for tree nodes. You can use node templates for parent nodes, child nodes, or both, and include images and custom elements.


Expand collapse icons

Easily customize the TreeView expand and collapse icons based on your application requirements.

Blazor TreeView expand collapse icons customization.


Blazor TreeView tooltip.

Tooltips for tree nodes

It supports tooltips for tree nodes that display information about the nodes while hovering over them. You can bind a tooltip from a data source along with node fields.


Context menu

A context menu can be integrated with the Blazor TreeView component to open when a node is right-clicked. The menu helps users perform node manipulations such as adding, removing, and renaming nodes.

Blazor TreeView context menu.


Blazor TreeView text wrap.

Text wrap

A node’s text wraps when it reaches edge of the TreeView. The node’s height will be adjusted automatically based on the content.


Tree Node Customization

It allows you to customize the tree nodes by level. For example, apply specific styles to leaf nodes, first child nodes, and second level nodes, etc.

Blazor TreeView TreeNode customization.


Blazor TreeView TreeNode validation.

Tree Node Validation

You can add validation to the tree node’s text on editing like required, a minimum or maximum length, etc.


Accessibility

Keyboard navigation in Blazor TreeView.

Keyboard navigation

The Blazor TreeView component ensures that every cell is accessible using the keyboard. Major features like sort, select, and edit can be performed using keyboard commands alone; no mouse interaction is required. This helps in creating highly accessible applications using this component.

Accessibility and screen reader support in Blazor TreeView.

Screen reader

The Blazor TreeView has complete WAI-ARIA accessibility support. The Data Grid UI includes high-contrast visual elements that help visually impaired people to have the best viewing experience. Also, valid UI descriptions are easily accessible through assistive technologies such as screen readers.

Show right-to-left language in Blazor TreeView.

Right to left (RTL)

Right-to-left rendering allows displaying the text and layout of the TreeView from right to left. This improves the user experience and accessibility for RTL languages.






Struggling to decide on the right product?

Our comprehensive competitor comparison of Blazor components will guide you to the perfect choice.

tick-mark 85+ UI components
tick-mark 960+ interactive Blazor demos
tick-mark 2.2M+ downloads
competitive-banner-FT-image

Other supported frameworks

TreeView is also available in Angular, React, Vue, and JavaScript frameworks. Check out the different TreeView platforms from the links below,

Supported browsers

The Blazor TreeView works well with all modern web browsers such as Chrome, Firefox, Microsoft Edge, Safari, and Opera.

Supported browsers in Blazor TreeView.

Blazor Components – 85+ UI and DataViz Components

Frequently Asked Questions

The Syncfusion Blazor TreeView supports the following features:

  • Display hierarchical data in a tree-view structure.
  • Load a wide range of nodes with optimal performance.
  • Flexible data binding with support to use data sources such as Web API, OData, Entity Framework, and more.
  • Drag and drop multiple selected tree nodes anywhere.
  • Select multiple nodes using built-in check boxes.
  • Edit node text inline with editable nodes support.
  • Easily customize nodes, expand icons, and collapse icons.
  • Customize TreeView items easily using a template and the CssClass property in a WebAssembly app.
  • Perform CRUD operations on TreeView components easily in a ASP.NET Core hosted WebAssembly applications.
  • One of the best Blazor Tree View in the market that offers feature-rich UI to interact with the software.
  • Simple configuration and API.
  • Supports all modern browsers.
  • Touch-friendly and responsive.
  • Extensive demos, documentation, and videos to learn quickly and get started with Blazor Tree View.

We do not sell the Blazor Tree View separately. It is only available for purchase as part of the Syncfusion team license. This contains over 1,800 components and frameworks, including the Blazor Tree View. The price of the team license starts at $395 per month for 5 developers, and includes support and updates until the subscription expires. In addition, we might offer discounts based on currently active promotions. Please contact our product specialists today to see if you qualify for any additional discounts.

You can find our Blazor Tree View demo, which demonstrates how to render and configure the TreeView.

No, our 1,800+ components and frameworks for web, mobile, and desktop, including our Blazor Tree View, are not sold individually. They are only available as part of a team license. However, we have competitively priced the product, so it only costs a little bit more than what some other vendors charge for their tree view component alone. We have also found that, in our experience, our customers usually start off using one of our products and then expand to several products quickly, so we felt it was best to offer all 1,800+ components and frameworks for a subscription fee that starts at $395 per month for a team of 5 developers. Additionally, we might be able to offer discounts based on currently active promotions. Please contact our product specialists today to see if you qualify for any additional discounts.

No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.

A good place to start would be our comprehensive getting started documentation.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Transform your applications today by downloading our free evaluation version
Download Free Trial No credit card required.

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Recent activities in Blazor TreeView tutorials and blogs

The Blazor TreeView tutorial videos and blog posts will guide you in building your first app with Blazor components. They provide problem-solving strategies, describe features and functionalities, announce new feature releases, explain best practices, and showcase example scenarios. Explore our latest posts on our blog and tutorial video channels for Blazor TreeView updates.

Up arrow icon