# relatives-tree

> Calculates families and nodes positions for rendering a family tree

Latest version **3.2.2** (published 2025-03-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install relatives-tree
pnpm add relatives-tree
yarn add relatives-tree
bun add relatives-tree
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.2 |
| Published | 2025-03-16 |
| First published | 2018-12-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 116.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 55 |
| Author | Sanich Kotikov |
| Maintainers | sanich |
| Keywords | family-tree, family, relatives, node, connection |

## Links

- npm: https://www.npmjs.com/package/relatives-tree
- Repository: https://github.com/SanichKotikov/relatives-tree
- Issues: https://github.com/SanichKotikov/relatives-tree/issues
- npm.io page: https://npm.io/package/relatives-tree

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 3.2.2 (latest) — 2025-03-16
- 3.2.1 — 2024-07-10
- 3.2.0 — 2022-07-18
- 3.1.0 — 2021-12-16
- 3.0.2 — 2021-11-04
- 3.0.1 — 2021-03-22
- 3.0.0 — 2021-03-20
- 2.1.1 — 2020-10-31
- 2.1.0 — 2020-10-25
- 2.0.2 — 2020-07-08
- 2.0.1 — 2020-05-10
- 2.0.0 — 2020-05-10
- 1.3.3 — 2019-08-14
- 1.3.2 — 2019-07-26
- 1.3.1 — 2019-02-01
- … 8 more at https://npm.io/package/relatives-tree/versions

## README

# relatives-tree

A tiny library (~3.23 kB br) for calculating specific JSON data to family tree nodes and connectors.

🖥 [Here is a demo](https://sanichkotikov.github.io/react-family-tree-example/) app with React rendering.

```js
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](/docs)  
🛠️ [React example](https://github.com/SanichKotikov/react-family-tree) (react-family-tree source code)   
🛠️ [Solid example](https://github.com/SanichKotikov/solid-family-tree-example)

📝 [JSON data examples](/samples).

## Contributing

Please read [this documentation](https://github.com/SanichKotikov/contributing) before contributing.

---
_Source: https://npm.io/package/relatives-tree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
