react-treeview

Easy, light, flexible tree view made with React.

  • 所有者: chenglou/react-treeview
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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.

主要指标

概览
名称与所有者chenglou/react-treeview
主编程语言JavaScript
编程语言JavaScript (语言数: 2)
平台
许可证
所有者活动
创建于2013-07-18 07:39:37
推送于2025-05-29 01:49:11
最后一次提交2025-05-28 21:49:11
发布数27
最新版本名称v0.4.7 (发布于 )
第一版名称v0.0.0 (发布于 )
用户参与
星数1.1k
关注者数27
派生数160
提交数134
已启用问题?
问题数39
打开的问题数12
拉请求数17
打开的拉请求数2
关闭的拉请求数9
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?