react-ui-tree

4.0.0 • Public • Published

react-ui-tree

Build Status npm npm

React tree component

This project was initially developed for a webpage builder. It maintains an internal tree structure within the component through js-tree.

Demo

https://pqx.github.io/react-ui-tree

Installation

npm install react-ui-tree --save

Usage

<Tree
  paddingLeft={20}              // left padding for children nodes in pixels
  tree={this.state.tree}        // tree object
  onChange={this.handleChange}  // onChange(tree) tree object changed
  renderNode={this.renderNode}  // renderNode(node) return react element
/>
 
// a sample tree object
// node.children, node.collapsed, node.leaf properties are hardcoded
{
  "module": "react-ui-tree",
  "children": [{
    "collapsed": true,
    "module": "dist",
    "children": [{
      "module": "node.js"
    }]
  }]
}

check app.js for a working example

Development

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.0.01,558latest

Version History

VersionDownloads (Last 7 Days)Published
4.0.01,558
3.1.022
3.0.07
2.6.057
2.5.00
2.4.10
2.4.00
2.3.00
2.2.20
2.2.10
2.2.00
2.1.40
2.1.30
2.1.20
2.1.10
2.1.00
2.0.70
2.0.60
2.0.50
2.0.41
2.0.30
2.0.20
2.0.00
1.1.21
1.1.11
1.1.00
1.0.10
1.0.00

Package Sidebar

Install

npm i react-ui-tree

Weekly Downloads

1,647

Version

4.0.0

License

MIT

Unpacked Size

19.9 kB

Total Files

10

Last publish

Collaborators

  • adjusted