Home

Awesome

React Complex Tree

npm downloads

Demo for React Complex Tree

An Unopinionated Accessible Tree Component with Multi-Select and Drag-And-Drop

<a href="https://www.producthunt.com/posts/react-complex-tree?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-react-complex-tree" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=303494&theme=light" alt="React Complex Tree - Unopinionated accessible tree component with drag and drop | Product Hunt" width="250" height="54" /></a>

Look into the official documentation to see more examples and more comprehensive documentation. Many common issues or questions are covered in the FAQ page.

The Changelog is available at https://rct.lukasbach.com/docs/changelog. Check the v2 release notes when migrating from v1.x to v2.x.

Sponsors

The development of react-complex-tree is supported by the community. Special thanks to:

<br /> <div align="center"> <a href="https://modyfi.com#gh-light-mode-only"> <div> <img src="https://lukasbach.com/thanks/modyfi-brand-logo-black.svg#gh-light-mode-only" width="250" alt="Modyfi" /> </div> </a> <a href="https://modyfi.com#gh-dark-mode-only"> <div> <img src="https://lukasbach.com/thanks/modyfi-brand-logo.svg#gh-dark-mode-only" width="250" alt="Modyfi" /> </div> </a> </div> <br />

Find out how to support the development of react-complex-tree.

Installation

To start using React Complex Tree, install it to your project as a dependency via

npm install react-complex-tree
yarn add react-complex-tree

then import it and add your tree structure with

import { UncontrolledTreeEnvironment, Tree, StaticTreeDataProvider } from 'react-complex-tree';

<UncontrolledTreeEnvironment
  dataProvider={new StaticTreeDataProvider(longTree.items, (item, data) => ({ ...item, data }))}
  getItemTitle={item => item.data}
  viewState={{}}
>
  <Tree treeId="tree-1" rootItem="root" treeLabel="Tree Example" />
</UncontrolledTreeEnvironment>;

More details at the Get Started Guide. The guide on how to integrate data with a static tree data provider is also a good starting point to understand how to integrate data with React Complex Tree.

Features

Hints for Contributing

If you want to develop RCT locally, here are some hints: