React component that renders a family tree
npm install react-family-treeReact component that renders a family tree.
Demo.
``bash`
npm i -S react-family-tree
`jsx
import ReactFamilyTree from 'react-family-tree';
import FamilyNode from './your-components/FamilyNode';
const WIDTH = 70;
const HEIGHT = 80;
rootId={rootId}
width={WIDTH}
height={HEIGHT}
renderNode={(node) => (
node={node}
style={{
width: WIDTH,
height: HEIGHT,
transform: translate(${node.left (WIDTH / 2)}px, ${node.top (HEIGHT / 2)}px),``
}}
/>
)}
/>