# react-treebeard
**Repository Path**: mirrors_fkhadra/react-treebeard
## Basic Information
- **Project Name**: react-treebeard
- **Description**: React TreeBeard with context menu
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-08
- **Last Updated**: 2026-01-17
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# react-treebeard
[](https://travis-ci.org/alexcurtis/react-treebeard) [](https://coveralls.io/github/alexcurtis/react-treebeard?branch=master)
React Tree View Component. Data-Driven, Fast, Efficient and Customisable.
### Install
```
npm install react-treebeard --save
```
### [Example](http://alexcurtis.github.io/react-treebeard/)
An online example from the `/example` directory can be found here: [Here](http://alexcurtis.github.io/react-treebeard/)
### Quick Start
```javascript
'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import {Treebeard} from 'react-treebeard';
const data = {
name: 'root',
toggled: true,
children: [
{
name: 'parent',
children: [
{ name: 'child1' },
{ name: 'child2' }
]
},
{
name: 'loading parent',
loading: true,
children: []
},
{
name: 'parent',
children: [
{
name: 'nested parent',
children: [
{ name: 'nested child 1' },
{ name: 'nested child 2' }
]
}
]
}
]
};
class TreeExample extends React.Component {
constructor(props){
super(props);
this.state = {};
this.onToggle = this.onToggle.bind(this);
}
onToggle(node, toggled){
if(this.state.cursor){this.state.cursor.active = false;}
node.active = true;
if(node.children){ node.toggled = toggled; }
this.setState({ cursor: node });
}
render(){
return (