Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
react-organizational-chart
Advanced tools
Simple react hierarchy tree - any React children accepted for nodes
Simple react hierarchy tree - any React children accepted for nodes
npm install --save react-organizational-chart
import React from 'react';
import { Tree, TreeNode } from 'react-organizational-chart';
const ExampleTree = () => (
<Tree label={<div>Root</div>}>
<TreeNode label={<div>Child 1</div>}>
<TreeNode label={<div>Grand Child</div>} />
</TreeNode>
</Tree>
);
const StyledNode = styled.div`
padding: 5px;
border-radius: 8px;
display: inline-block;
border: 1px solid red;
`;
const StyledTreeExample = () => (
<Tree
lineWidth={'2px'}
lineColor={'green'}
lineBorderRadius={'10px'}
label={<StyledNode>Root</StyledNode>}
>
<TreeNode label={<StyledNode>Child 1</StyledNode>}>
<TreeNode label={<StyledNode>Grand Child</StyledNode>} />
</TreeNode>
<TreeNode label={<StyledNode>Child 2</StyledNode>}>
<TreeNode label={<StyledNode>Grand Child</StyledNode>}>
<TreeNode label={<StyledNode>Great Grand Child 1</StyledNode>} />
<TreeNode label={<StyledNode>Great Grand Child 2</StyledNode>} />
</TreeNode>
</TreeNode>
<TreeNode label={<StyledNode>Child 3</StyledNode>}>
<TreeNode label={<StyledNode>Grand Child 1</StyledNode>} />
<TreeNode label={<StyledNode>Grand Child 2</StyledNode>} />
</TreeNode>
</Tree>
);
Interactive examples can be found here
Tree
- The root of the treeAccepts the following props:
Node
<TreeNode>
<TreeNode>
as a css lengthTreeNode
- A node in the treeNode
<TreeNode>
I created react-organizational-chart
because i could not find any other react organizational chart that supports react components as nodes.
MIT © daniel-hauser
FAQs
Simple react hierarchy tree - any React children accepted for nodes
The npm package react-organizational-chart receives a total of 31,746 weekly downloads. As such, react-organizational-chart popularity was classified as popular.
We found that react-organizational-chart demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.