Skip to content

Repository files navigation

@ctrl/react-orgchart npm

React wrapper around a d3 v6 based org chart.

This is based on smartprocure/react-org-chart which itself is also a fork. This fork has been updated to use d3 v6 and expose typescript types.

Demo locally with pnpm dev.

Install

pnpm add @ctrl/react-orgchart

Use

import{OrgChart}from'@ctrl/react-orgchart';<OrgCharttree={tree}/>;

Sample tree data

{id: 1,entity: {id: 1,// base 64 imageavatar: 'data:image/jpeg;base64,/9j....',name: 'Jane Doe',title: 'IT',},children: [{id: 2,entity: {id: 2,// svg exampleavatar: '<svg></svg>',name: 'John Foo',title: 'CTO',},children: [],},],}

Releases

Packages

Used by

Contributors

Languages