All Projects → artdong → react-org-tree

artdong / react-org-tree

Licence: MIT license
😃 a simple organization tree component based on react

Programming Languages

javascript
184084 projects - #8 most used programming language
Less
1899 projects

Projects that are alternatives of or similar to react-org-tree

react
Basic Primitives Diagrams for React. Data visualization components library that implements organizational chart and multi-parent dependency diagrams.
Stars: ✭ 15 (-79.17%)
Mutual labels:  tree, organization-chart
BasicExercises
📘 Personal basic practice test playground.
Stars: ✭ 84 (+16.67%)
Mutual labels:  tree
LoveTree
🌴爱情树,将相爱的时刻永远珍藏 (微信,QQ可完美查看)https://ajlovechina.github.io/LoveTree/
Stars: ✭ 295 (+309.72%)
Mutual labels:  tree
github-pr-diff-tree
🌲 This action provide a comment that displays the diff of the pull request in a tree format.
Stars: ✭ 31 (-56.94%)
Mutual labels:  tree
service-tree
[ABANDONED] A tree that stores services in its node for a given key, and allows traversing them.
Stars: ✭ 33 (-54.17%)
Mutual labels:  tree
ctl
My variant of the C Template Library
Stars: ✭ 105 (+45.83%)
Mutual labels:  tree
BBob
⚡️Blazing-fast js-bbcode-parser, bbcode js, that transforms and parses to AST with plugin support in pure javascript, no dependencies
Stars: ✭ 133 (+84.72%)
Mutual labels:  tree
ipld-explorer-cli
🔎 Explore the IPLD directed acyclic graph with your keyboard
Stars: ✭ 22 (-69.44%)
Mutual labels:  tree
Low Poly Procedural Trees and Vegetations Project
No description or website provided.
Stars: ✭ 14 (-80.56%)
Mutual labels:  tree
svelte-mindmap
Svelte component for MindMap
Stars: ✭ 122 (+69.44%)
Mutual labels:  tree
merkle-patricia-tree
☔️🌲 A fast, in-memory optimized merkle patricia tree
Stars: ✭ 22 (-69.44%)
Mutual labels:  tree
kvstore
KVStore is a simple Key-Value Store based on B+Tree (disk & memory) for Java
Stars: ✭ 88 (+22.22%)
Mutual labels:  tree
dd-algorithm-examples
Code Snippets of DataStructure & Algorithm & LeetCode Implementations/Solutions for Several Programming Language: Java, JavaScript, Go, Python, Rust, etc. 💫 多语言版本的数据结构与算法实现分析
Stars: ✭ 33 (-54.17%)
Mutual labels:  tree
ztree-for-react
jQuery zTreeV3.x 插件react封装
Stars: ✭ 22 (-69.44%)
Mutual labels:  tree
gneiss
compositional data analysis toolbox
Stars: ✭ 48 (-33.33%)
Mutual labels:  tree
android-thinkmap-treeview
Tree View; Mind map; Think map; tree map; custom view; 自定义;关系图;树状图;思维导图;组织机构图;层次图
Stars: ✭ 314 (+336.11%)
Mutual labels:  tree
immutable-gametree
An immutable game tree data type.
Stars: ✭ 18 (-75%)
Mutual labels:  tree
multitax
Python package to obtain, parse and explore biological taxonomies (GTDB, NCBI, Silva, Greengenes, OTT)
Stars: ✭ 22 (-69.44%)
Mutual labels:  tree
comment tree
Render comment tree like facebook comment - reply
Stars: ✭ 37 (-48.61%)
Mutual labels:  tree
Harbol
Harbol is a collection of data structure and miscellaneous libraries, similar in nature to C++'s Boost, STL, and GNOME's GLib
Stars: ✭ 18 (-75%)
Mutual labels:  tree

react-org-tree

npm version mnt-image GitHub stars GitHub forks npm download dumi GitHub license

A simple organization tree component based on react

If you are using vue, see vue-org-tree

Installation

# use npm
npm i react-org-tree

# use yarn
yarn add react-org-tree

Usage

import OrgTree from 'react-org-tree';

const horizontal = false; // true:横向  false:纵向
const collapsable = true; // true:可折叠 false:不可折叠 
const expandAll = true; // true: 全部展开 false:全部折叠 

const data = {
    id: 0,
    label: 'XXX股份有限公司',
    children: [{
        id: 1,
        label: '技术部',
        children: [{
            id: 4,
            label: '后端工程师'
        }, {
            id: 5,
            label: '前端工程师'
        }, {
            id: 6,
            label: '运维工程师'
        }]
    }, {
        id: 2,
        label: '人事部'
    }, {
        id: 3,
        label: '销售部'
    }]
}

<OrgTree
    data={data}
    horizontal={horizontal}
    collapsable={collapsable}
    expandAll={expandAll}
>

Preview

横向(horizontal)

纵向(vertical)

部分展开(expand)

全部展开(expandAll)

API

参数(prop) 说明(descripton) 类型(type) 默认值(default)
data 树结构数据 Object {}
horizontal 是否横向 Boolean false
collapsable 是否可折叠 Boolean false
expandAll 是否展开全部 Boolean false
labelWidth 树节点宽度 Number auto
labelClassName 树节点样式 String white
onClick 点击事件 Function(e:Event, data)

Example

https://artdong.github.io/react-org-tree/demo

License

react-org-tree is released under the MIT license.

欢迎关注微信公众号全栈弄潮儿 ,获取更多学习资源及技术文章等

  • 微信公众号二维码,扫一扫或者搜索"全栈弄潮儿"即可关注

Build errors

请作者喝一杯咖啡

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].