{"id":28254013,"url":"https://github.com/cnimmo16/react-erd","last_synced_at":"2026-03-04T10:02:42.304Z","repository":{"id":135236185,"uuid":"612173127","full_name":"CNimmo16/react-erd","owner":"CNimmo16","description":"An easy-to-use component for rendering Entity Relationship Diagrams in React","archived":false,"fork":false,"pushed_at":"2025-07-28T20:51:03.000Z","size":616,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-28T22:29:35.748Z","etag":null,"topics":["entity-relationship-diagram","erd","react"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/CNimmo16.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2023-03-10T11:02:54.000Z","updated_at":"2025-07-28T20:51:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"929e4247-72a4-4efe-a10a-56a897d3ba7b","html_url":"https://github.com/CNimmo16/react-erd","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/CNimmo16/react-erd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNimmo16%2Freact-erd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNimmo16%2Freact-erd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNimmo16%2Freact-erd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNimmo16%2Freact-erd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CNimmo16","download_url":"https://codeload.github.com/CNimmo16/react-erd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNimmo16%2Freact-erd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273804739,"owners_count":25171557,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["entity-relationship-diagram","erd","react"],"created_at":"2025-05-19T18:19:18.864Z","updated_at":"2026-03-04T10:02:37.262Z","avatar_url":"https://github.com/CNimmo16.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React ERD\n\nAn easy-to-use component for rendering Entity Relationship Diagrams in React\n\n![Example image](/example.png)\n\n## Installation\n\nInstall `react-erd` using npm:\n\n```\nnpm install --save react-erd\n```\n\nor yarn:\n\n```\nyarn add react-erd\n```\n\n## Compatibility\n\nReact ERD is compatible with React v18+.\n\n## Usage\n\n```js\nimport { RelationshipDiagram } from 'react-erd';\nimport 'react-erd/dist/style.css'\n\nfunction MyComponent() {\n  return (\n    \u003cRelationshipDiagram\n      schemas={[\n        {\n          name: \"order_data\",\n          tables: [\n            {\n              name: \"orders\",\n              primaryKey: \"id\",\n              color: \"yellow\",  // Optional. Use this specific color rather than those defined in tableColors\n              columns: [\n                {\n                  name: \"id\",\n                  type: \"number\",\n                  foreignKeys: [],\n                },\n                {\n                  name: \"customer_id\",\n                  type: \"number\",\n                  foreignKeys: [\n                    {\n                      foreignSchemaName: \"customer_data\",\n                      foreignTableName: \"customers\",\n                      foreignColumnName: \"id\",\n                      constrained: true,\n                    },\n                  ],\n                },\n              ],\n            }\n          ]\n        },\n        ...\n      ]}\n      onSchemasChange={...}\n      onCreateForeignKey={...}\n      onDeleteForeignKey={...}\n      onAttemptToRecreateExistingRelationship={...}\n      onAttemptToConnectColumnToItself={...}\n      onAttemptToDeleteConstrainedRelationship={...}\n      tableColors={['red', 'blue', 'green']}\n    /\u003e\n  );\n}\n```\n\n## Caveats\n\nNote that the diagrams produced by this library are not Entity Relationship Diagrams in the strictest sense.\n\nTraditionally, associative/junction tables used in many-to-many relationships are not represented as their own entity in an ERD. Instead the entities on each side of the relationship are joined by a single line, annotated with the appropriate \"crow foot\" notation to represent the many-to-many relation type.\n\nReact ERD was designed for use-cases where you want to provide users with a more 1:1 insight into the actual _tables_ in their database, rather than the _entities_ represented in your application.\n\nIn future React ERD may support more traditional forms of ERDs (see [roadmap](#roadmap) below).\n\n## Roadmap\n\n- Provide a controls overlay for navigating the diagram as an alternative to mouse/touch gestures.\n- Improve control over diagram styles - potentially move towards a \"headless\" model.\n- Support rendering many-to-many relationships in the traditional way using crow-foot notation and hidden junction table (see [caveats](#caveats)).\n- Allow configuration of table positions on screen.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnimmo16%2Freact-erd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnimmo16%2Freact-erd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnimmo16%2Freact-erd/lists"}