vue-force-graph

Vue component for 2D, 3D, VR and AR force directed graphs
17,517 29
Install
npm install vue-force-graph
Latest Version:1.2.0
Vue:3
License:MIT
Last Updated:Jul 3, 2026
Links: GitHub  ·  npm
Maintainer: zjfcool

vue-force-graph

npm version

Vue components for 2D, 3D, VR and AR force‑directed graphs.

Available as four standalone packages:

Strongly recommended: install only the renderer you actually need to keep your bundle small.
A vue-force-graph meta‑package is also available if you require every mode, but its use is discouraged.


✨ Examples

To load any of vue-force-graph-ar examples below:

  1. Open this hiro marker image in your desktop browser.
  2. Open the example on your phone browser, and point it at your desktop screen.

📦 Installation

Per renderer (recommended)

npm install vue-force-graph-2d
# or
npm install vue-force-graph-3d
# or
npm install aframe
npm install vue-force-graph-vr
# or
npm install @ar-js-org/ar.js
npm install vue-force-graph-ar

Meta‑package (all renderers – not recommended)

npm install aframe
npm install vue-force-graph

🚀 Usage

<template>
  <ForceGraph2D :graph-data="graphData" />
  <ForceGraph3D :graph-data="graphData" />
  <ForceGraphVR :graph-data="graphData" />
  {/* <ForceGraphAR :graph-data="graphData" /> */}
</template>

<script setup>
import "aframe"
import {ForceGraph2D,ForceGraph3D,ForceGraphVR} from 'vue-force-graph'

const graphData = {
  nodes: [ /* ... */ ],
  links: [ /* ... */ ]
}

📚 Documentation

Each package has its own API reference covering the full Force Graph API and extended properties:

Related Packages

vue-gl

Vue.js components rendering 3D graphics reactively via three.js

8,863 682
arcade-api

Arcade API a PixiJS 8 Metaframework (alpha, breaking changes)

172

Version History

Version Released License
1.2.0 MIT
1.1.1 MIT
1.1.0 MIT
0.1.2 MIT
0.1.1 MIT
Pre-releases (7)
Version Released License
1.1.0-alpha.6 MIT
1.0.1-alpha.5 MIT
1.0.1-alpha.4 MIT
1.0.1-alpha.3 MIT
1.0.1-alpha.2 MIT