# cy-react-tree

> React tree component

Latest version **0.1.0** (published 2016-09-01) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install cy-react-tree
pnpm add cy-react-tree
yarn add cy-react-tree
bun add cy-react-tree
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-09-01 |
| First published | 2016-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 754 |
| Author | Wang Zuo |
| Maintainers | cvpcasada |
| Keywords | react, react-component, tree |

## Links

- npm: https://www.npmjs.com/package/cy-react-tree
- Repository: https://github.com/pqx/react-ui-tree
- Issues: https://github.com/pqx/react-ui-tree/issues
- npm.io page: https://npm.io/package/cy-react-tree

## Dependencies (2)

- [js-tree](https://npm.io/package/js-tree.md) ^1.1.0
- [classnames](https://npm.io/package/classnames.md) ^2.2.5

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-09-01

## README

# react-ui-tree [![Build Status](https://travis-ci.org/pqx/react-ui-tree.svg)](https://travis-ci.org/pqx/react-ui-tree)
React tree component

This is a fork of [react-ui-tree](https://pqx.github.io/react-ui-tree) by Wang Zuo. This project was initially developed for a webpage builder. It maintains an internal tree structure within the component through [js-tree](https://github.com/wangzuo/js-tree).

### Demo
[https://cvpcasada.github.io/react-ui-tree](https://cvpcasada.github.io/react-ui-tree)

### Installation
``` sh
npm install cy-react-tree --save
```
### Usage
``` javascript
<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"
    }]
  }]
}
```

### Development
- npm install
- npm start
- http://localhost:8888/example

### License
MIT

---
_Source: https://npm.io/package/cy-react-tree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
