Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-organizational-chart

> 前端框架
Open source

Simple react hierarchy tree - any React children accepted for nodes

194 stars0 likes1 views
WebsiteGitHub

About

Simple react hierarchy tree - any React children accepted for nodes

react-organizational-chart

Simple react hierarchy tree - any React children accepted for nodes

Install

bash
npm install --save react-organizational-chart

Usage

javascript
import React from 'react';
import { Tree, TreeNode } from 'react-organizational-chart';

const ExampleTree = () => (
  
    
      
    
  
);

Examples

Styled tree

javascript
const StyledNode = styled.div`
  padding: 5px;
  border-radius: 8px;
  display: inline-block;
  border: 1px solid red;
`;

const StyledTreeExample = () => (
  Root}
  >
    Child 1}>
      Grand Child} />
    
    Child 2}>
      Grand Child}>
        Great Grand Child 1} />
        Great Grand Child 2} />
      
    
    Child 3}>
      Grand Child 1} />
      Grand Child 2} />
    
  
);

Interactive examples can be found here

Components

Tree - The root of the tree

Accepts the following props:

  • label: (required) Any react Node
  • children: (required) Any number of ``
  • lineHeight: (default 20px) The height of the Path as a css length
  • lineWidth: (default 1px) The width of the Path as a css length
  • lineColor: (default black) The color of the Path as a css color
  • lineStyle: (default solid) The line style as a css line-style
  • lineBorderRadius: (default 5px) The border radius of the Path as a css border-radius
  • nodePadding: (default 5px) The left and right padding of every `` as a css length

TreeNode - A node in the tree

  • label: (required) Any react Node
  • children: (required) Any number of ``

Motivation

I created react-organizational-chart because i could not find any other react organizational chart that supports react components as nodes.

Alternatives

  • org-chart is highly customizable but can't render React components as nodes.

License

MIT © daniel-hauser

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptchartorg-chartreacttree

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架