react-treeview

Easy, light, flexible tree view made with React.

  • Owner: chenglou/react-treeview
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

React-treeview npm version Bower version

Easy, light, flexible treeview made with React.

Demos from the demos folder.

install

Npm:

npm install react-treeview

Bower:

bower install react-treeview

The CSS file:

<link rel="stylesheet" type="text/css" href="path/to/react-treeview.css">

API

<TreeView />

The component accepts these props.

  • collapsed: whether the node is collapsed or not.
  • defaultCollapsed: the uncontrolled equivalent to collapsed.
  • nodeLabel: the component or string (or anything renderable) that's displayed beside the TreeView arrow.
  • itemClassName: the class name of the .tree-view_item div.
  • treeViewClassName: the class name of the .tree-view div.
  • childrenClassName: the class name of the .tree-view_children item div.

TreeViews can be naturally nested.

The extra properties transferred onto the arrow, so all attributes and events naturally work on it.

Styling

The CSS is flexible, commented and made to be easily customized. Feel free to inspect the demo's classes and check the short CSS code.

Build It Yourself/Run the Demos

Build: npm install && npm run prerelease

Demos: npm install && npm start && open http://localhost:3000

License

MIT.

Main metrics

Overview
Name With Ownerchenglou/react-treeview
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 2)
Platform
License:
所有者活动
Created At2013-07-18 07:39:37
Pushed At2025-05-29 01:49:11
Last Commit At2025-05-28 21:49:11
Release Count27
Last Release Namev0.4.7 (Posted on )
First Release Namev0.0.0 (Posted on )
用户参与
Stargazers Count1.1k
Watchers Count27
Fork Count160
Commits Count134
Has Issues Enabled
Issues Count39
Issue Open Count12
Pull Requests Count17
Pull Requests Open Count2
Pull Requests Close Count9
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private