The React Tree View is a graphical user interface component that to represents hierarchical data in a tree structure. It provides great performance with its advanced features like load on demand, checkbox support, multiple selection, tree navigation, drag and drop, tree node editing, and template support.
Bind data to the React Tree View component from any valid data source, such as XML, JSON, and JSONP. The tree data can be local or remote data and fetched using different kinds of adaptors like OData, OData V4, URL, JSON, and Web API.
The React TreeView component has a load-on-demand option that allows you to load huge amounts of data dynamically, which improves the control’s performance.
Also, child nodes in the control can be loaded from any web services or inserted dynamically.
Display nodes with labels and icons to present the content in a more readable format. This is helpful in making a typical directory tree and file system.
The React TreeView component provides built-in support for checkboxes, allowing users to select more than one item. The tree view checkbox has a tri-state mode also, which is applicable only for parent nodes. In this mode, the parent node will go into the indeterminate state when the child nodes are partially checked.
Tree nodes can be dragged and dropped from one parent node to another within the same level or at different levels.
Extending the drop behavior allows users to drop tree nodes from one tree view to another.
Drop tree nodes to any external container or component by extending the tree view node drop action.
The React TreeView component 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.
Edit the tree nodes’ label text on the client side by double-clicking it. When editing tree view nodes, the tree view data source will also be updated with the modified data.
Render the tree view nodes in the ascending or descending order based on the label text for improved readability.
The React TreeView component can be customized through its node template support, which allows defining a custom structure for tree nodes. You can use node templates specifically for parent nodes, child nodes, or both, and include images and any custom element structure.
Easily customize the expand and collapse icons based on the requirement of your application.
Supports right-to-left (RTL) direction for users working with right-to-left languages like Hebrew, Arabic, or Persian.
The React TreeView component has a rich set of developer-friendly APIs to control all UI elements and behaviors, allowing you to provide the best experience to your end users.
Easily get started with the React TreeView using a few simple lines of TSX code as demonstrated below. Also explore our React TreeView Example that shows you how to render and configure the Treeview in React.
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { TreeViewComponent } from '@syncfusion/ej2-react-navigations';
export default class App extends React.Component {
constructor() {
super(...arguments);
// define the array of data
this.data = [{ "id": "01", "name": "Local Disk (C:)", "expanded": true,
"subChild": [
{
"id": "01-01", "name": "Program Files",
"subChild": [
{ "id": "01-01-01", "name": "Windows NT" },
{ "id": "01-01-02", "name": "Windows Mail" },
{ "id": "01-01-03", "name": "Windows Photo Viewer" }
]
},
{
"id": "01-02", "name": "Users", "expanded": true,
"subChild": [
{ "id": "01-02-01", "name": "Smith" },
{ "id": "01-02-02", "name": "Public" },
{ "id": "01-02-03", "name": "Admin" }
]
},
{
"id": "01-03", "name": "Windows",
"subChild": [
{ "id": "01-03-01", "name": "Boot" },
{ "id": "01-03-02", "name": "FileManager" },
{ "id": "01-03-03", "name": "System32" }
]
}
]
},
{
"id": "02", "name": "Local Disk (D:)",
"subChild": [
{
"id": "02-01", "name": "Personals",
"subChild": [
{ "id": "02-01-01", "name": "My photo.png" },
{ "id": "02-01-02", "name": "Rental document.docx" },
{ "id": "02-01-03", "name": "Pay slip.pdf" }
]
},
{
"id": "02-02", "name": "Projects",
"subChild": [
{ "id": "02-02-01", "name": "ASP Application" },
{ "id": "02-02-02", "name": "TypeScript Application" },
{ "id": "02-02-03", "name": "React Application" }
]
},
{
"id": "02-03", "name": "Office",
"subChild": [
{ "id": "02-03-01", "name": "Work details.docx" },
{ "id": "02-03-02", "name": "Weekly report.docx" },
{ "id": "02-03-03", "name": "Wish list.csv" }
]
}
]
},
{
"id": "03", "name": "Local Disk (E:)", "icon": "folder",
"subChild": [
{
"id": "03-01", "name": "Pictures",
"subChild": [
{ "id": "03-01-01", "name": "Wind.jpg" },
{ "id": "03-01-02", "name": "Stone.jpg" },
{ "id": "03-01-03", "name": "Home.jpg" }
]
},
{
"id": "03-02", "name": "Documents",
"subChild": [
{ "id": "03-02-01", "name": "Environment Pollution.docx" },
{ "id": "03-02-02", "name": "Global Warming.ppt" },
{ "id": "03-02-03", "name": "Social Network.pdf" }
]
},
{
"id": "03-03", "name": "Study Materials",
"subChild": [
{ "id": "03-03-01", "name": "UI-Guide.pdf" },
{ "id": "03-03-02", "name": "Tutorials.zip" },
{ "id": "03-03-03", "name": "TypeScript.7z" }
]
}
]
}
];
this.fields = { dataSource: this.data, id: 'id', text: 'name', child: 'subChild' };
}
render() {
return (
<TreeViewComponent id="treeview" fields={this.fields}/>);
}
}
ReactDOM.render(<App />, document.getElementById('sample'));
The TreeView component is also available in Blazor, Vue, Angular, and JavaScript frameworks. Check out the different TreeView platforms from the links below,
We do not sell the React Tree View separately. It is only available for purchase as part of the Syncfusion React suite, which contains over 70 React components, including the Tree View. A single developer license for the Syncfusion Essential Studio for React suite costs $995.00 USD, including one year of support and updates. On top of this, we might be able to offer additional discounts based on currently active promotions. Please contact our sales team today to see if you qualify for any additional discounts.
You can find our React Tree View demo here.
No, our 70+ React components, including Tree View, are not sold individually, only as a single package. 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 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 70+ React components for a flat fee of $995/developer. On top of this, we might be able to offer additional discounts based on currently active promotions. Please contact our sales team 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 and five or fewer developers.
A good place to start would be our comprehensive getting started documentation.
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.