Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

relation-graph

> 前端框架
Open source

relation-graph is an relationship graph component for React/Vue/Svelte relationship data visualization/edit. Through its slot-based customization model, users

2.3K stars0 likes1 views
WebsiteGitHub

About

relation-graph is an relationship graph component for React/Vue/Svelte relationship data visualization/edit. Through its slot-based customization model, users

relation-graph v3.x has now been released, with support for more platforms while keeping the code cleaner and more elegant. View the architecture here:

https://relation-graph.com/docs/multi-platform-architecture

At the same time, Relation Graph’s structure is naturally LLM-friendly. Because its architecture is clear, its knowledge is easier to understand. The knowledge files are located at:

<source-code-root>/knowledge-for-ai


relation-graph

English | 简体中文

  • relation-graph is a relationship data display component that supports React, Vue 2, Vue 3, Svelte and WebComponent. It enables users to fully customize graphical elements using "common HTML elements, Vue components, React components" through slots, and provides practical API interfaces to facilitate the development of interactive graphical applications."
  • In addition to the typical relationship data display functionality, the relation-graph also supports being used as a drawing board. You can place any content on the drawing board, simply by setting an id for the elements you want to connect, and defining "element lines." This allows for the easy creation of a drawing board that supports the creation of arbitrary connections, zooming and dragging, and dynamic interactions through the API.

Docs & Examples

  • https://relation-graph.com

The website above includes documentation, online demos, and a visual configuration tool for software developers.

Getting Started

bash
# React
npm install --save @relation-graph/react
# Vue3
npm install --save @relation-graph/vue
# Vue2
npm install --save @relation-graph/vue2
# Svelte
npm install --save @relation-graph/svelte
# Web Components
import { ... } from "https://esm.sh/@relation-graph/web-components";
typescript
// React:
import RelationGraph from '@relation-graph/react'
// Vue3:
import RelationGraph from '@relation-graph/vue'
// Vue2:
import RelationGraph from '@relation-graph/vue2'
// Svelte:
import RelationGraph from '@relation-graph/svelte'
// Web Components:
// Use the custom element <relation-graph></relation-graph>;
Use relation-graph in react #### `index.tsx` ```typescript jsx import { RGProvider } from '@relation-graph/react'; import React from 'react'; import MyGraph from "./MyGraph"; const MyExample: React.FC = () => { return ( ); }; export default MyExample; ```

MyGraph.tsx

…

CustomNode.tsx

…

Sample code effects


Example Projects

  • The complete Vue2 sample project:

  • https://github.com/relation-graph/relation-graph-startup-for-vue2

  • Run the complete Vue2 sample project online

  • The complete Vue3 sample project:

  • https://github.com/relation-graph/relation-graph-startup-for-vue3

  • Run the complete Vue3 sample project online

  • The complete React sample project:

  • https://github.com/relation-graph/relation-graph-startup-for-react

  • Run the complete React sample project online

  • The complete Svelte sample project:

  • https://github.com/relation-graph/relation-graph-startup-for-svelte

  • Run the complete Svelte sample project online

  • The complete Web Components sample project:

  • https://github.com/relation-graph/relation-graph-startup-for-web-component

  • Run the complete Web Components sample project online

More Examples

  • https://relation-graph.com/examples

  • The complete Vue3 sample project:

  • https://github.com/relation-graph/relation-graph-startup-for-vue3

  • Run the complete Vue3 sample project online

  • The complete React sample project:

  • https://github.com/relation-graph/relation-graph-startup-for-react

  • Run the complete React sample project online

  • The complete Svelte sample project:

  • https://github.com/relation-graph/relation-graph-startup-for-svelte

  • Run the complete Svelte sample project online

  • The complete Web Components sample project:

  • https://github.com/relation-graph/relation-graph-startup-for-web-component

  • Run the complete Web Components sample project online

More info

  • https://relation-graph.com

Contact me

  • My WhatsApp:

  • QQ:3235808353

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptknowledge-graphlayout-enginereactrelationship-graph

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架