chenglou/react-treeview
JavaScriptEasy, light, flexible tree view made with React.
reacttreeviewui-component
주요 지표
스타 성장
스타
1.1k
포크
154
주간 성장
+0
이슈
12
5001k
2013년 7월2015년 9월2017년 12월2020년 2월2022년 5월2024년 8월2026년 10월
아티팩트npm
README
React-treeview

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 tocollapsed.nodeLabel: the component or string (or anything renderable) that's displayed beside the TreeView arrow.itemClassName: the class name of the.tree-view_itemdiv.treeViewClassName: the class name of the.tree-viewdiv.childrenClassName: the class name of the.tree-view_childrenitem div.onClick: callback triggered when the arrow is clicked.
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.