react-ui-tree
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=thisstatetree // tree object onChange=thishandleChange // onChange(tree) tree object changed renderNode=thisrenderNode // 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
- npm install
- npm start
- http://localhost:8080/example
License
MIT