{"id":18369107,"url":"https://github.com/bitfancy/reacttreed3","last_synced_at":"2025-04-10T19:39:42.431Z","repository":{"id":188018185,"uuid":"677967426","full_name":"BitFancy/reacttreed3","owner":"BitFancy","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-13T09:06:18.000Z","size":563,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T20:54:18.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BitFancy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-13T08:42:05.000Z","updated_at":"2024-04-03T19:17:21.000Z","dependencies_parsed_at":"2023-09-06T07:01:02.630Z","dependency_job_id":null,"html_url":"https://github.com/BitFancy/reacttreed3","commit_stats":null,"previous_names":["fancydeveloper/reacttreed3","bitfancy/reacttreed3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitFancy%2Freacttreed3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitFancy%2Freacttreed3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitFancy%2Freacttreed3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitFancy%2Freacttreed3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BitFancy","download_url":"https://codeload.github.com/BitFancy/reacttreed3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281424,"owners_count":21077423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T23:28:28.619Z","updated_at":"2025-04-10T19:39:42.407Z","avatar_url":"https://github.com/BitFancy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eReact D3 Tree\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#buildstatus\"\u003e\n    \u003cimg alt=\"build status\" src=\"https://github.com/bkrem/react-d3-tree/workflows/Build/badge.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/bkrem/react-d3-tree?branch=master\"\u003e\n    \u003cimg alt=\"coverage status\" src=\"https://coveralls.io/repos/github/bkrem/react-d3-tree/badge.svg?branch=master\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/react-d3-tree\"\u003e\n    \u003cimg alt=\"npm package\" src=\"https://img.shields.io/npm/v/react-d3-tree?style=flat\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/react-d3-tree\"\u003e\n    \u003cimg alt=\"npm package: downloads monthly\" src=\"https://img.shields.io/npm/dm/react-d3-tree.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/result?p=react-d3-tree\"\u003e\n    \u003cimg alt=\"npm package: minzipped size\" src=\"https://img.shields.io/bundlephobia/minzip/react-d3-tree\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/react-d3-tree\"\u003e\n    \u003cimg alt=\"npm package: types\" src=\"https://img.shields.io/npm/types/react-d3-tree\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/prettier/prettier\"\u003e\n    \u003cimg alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003e\u003ca href=\"https://bkrem.github.io/react-d3-tree\"\u003e👾 Playground\u003c/a\u003e\u003c/h3\u003e\n  \u003ch3 align=\"center\"\u003e\u003ca href=\"https://bkrem.github.io/react-d3-tree/docs\"\u003e📖 API Documentation (v3)\u003c/a\u003e\u003c/h3\u003e\n\u003c/p\u003e\n\n\n## Contents \u003c!-- omit in toc --\u003e\n- [Installation](#installation)\n- [Usage](#usage)\n- [Props](#props)\n- [Working with the default Tree](#working-with-the-default-tree)\n  - [Providing `data`](#providing-data)\n  - [Styling Nodes](#styling-nodes)\n  - [Styling Links](#styling-links)\n  - [Event Handlers](#event-handlers)\n- [Customizing the Tree](#customizing-the-tree)\n  - [`renderCustomNodeElement`](#rendercustomnodeelement)\n  - [`pathFunc`](#pathfunc)\n    - [Providing your own `pathFunc`](#providing-your-own-pathfunc)\n- [Development](#development)\n  - [Setup](#setup)\n  - [Hot reloading](#hot-reloading)\n- [Contributors](#contributors)\n\n## Installation\n```bash\nnpm i --save react-d3-tree\n```\n\n## Usage\n```jsx\nimport React from 'react';\nimport Tree from 'react-d3-tree';\n\n// This is a simplified example of an org chart with a depth of 2.\n// Note how deeper levels are defined recursively via the `children` property.\nconst orgChart = {\n  name: 'CEO',\n  children: [\n    {\n      name: 'Manager',\n      attributes: {\n        department: 'Production',\n      },\n      children: [\n        {\n          name: 'Foreman',\n          attributes: {\n            department: 'Fabrication',\n          },\n          children: [\n            {\n              name: 'Worker',\n            },\n          ],\n        },\n        {\n          name: 'Foreman',\n          attributes: {\n            department: 'Assembly',\n          },\n          children: [\n            {\n              name: 'Worker',\n            },\n          ],\n        },\n      ],\n    },\n  ],\n};\n\nexport default function OrgChartTree() {\n  return (\n    // `\u003cTree /\u003e` will fill width/height of its container; in this case `#treeWrapper`.\n    \u003cdiv id=\"treeWrapper\" style={{ width: '50em', height: '20em' }}\u003e\n      \u003cTree data={orgChart} /\u003e\n    \u003c/div\u003e\n  );\n}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitfancy%2Freacttreed3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitfancy%2Freacttreed3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitfancy%2Freacttreed3/lists"}