relatives-tree-cjs

Calculates families and nodes positions for rendering a family tree

Usage no npm install needed!

<script type="module">
  import relativesTreeCjs from 'https://cdn.skypack.dev/relatives-tree-cjs';
</script>

README

relatives-tree

A tiny library (~3.21 KB gz) for calculating specific JSON data to family tree nodes and connectors.

🖥 Here is a demo app with React rendering.

import calcTree from 'relatives-tree';
const tree = calcTree(json, { rootId });

The nodes & the connectors are simple JS objects, so you can use any rendering layer.

Usage

🛠 Canvas example
🛠️ React example (react-family-tree source code)
🛠️ Solid example

📝 JSON data examples