Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reagraph

Package Overview
Dependencies
Maintainers
0
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reagraph

WebGL Node-based Graph for React

  • 4.20.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source


WebGL Network Graphs for React

Open Collective backers and sponsors

Reagraph is a high-performance network graph visualization built in WebGL for React.

💎 Other Projects

  • Reaflow - Open-source library for workflow and diagram graphs.
  • Reablocks - Open-source component library for React based on Tailwind.
  • Reaviz - Open-source library for data visualizations for React.
  • Reachat - Open-source library for building LLM/Chat UIs for React.

✨ Features

  • WebGL based for high performance
  • Node Sizing based on attribute, page rank, centrality, custom
  • Light and Dark Mode with custom theme ability
  • Path finding between nodes
  • Radial Context Menu
  • Highlight and Selection Hook
  • Dragging Nodes
  • Lasso Selection
  • Expand/Collapse Nodes
  • Customizable Nodes
  • Advanced Label Placement
  • Edge Interpolation
  • Clustering

with the following built in layouts:

  • Force Directed 2D
  • Force Directed 3D
  • Circular 2D
  • Tree Top Down 2D
  • Tree Left Right 2D
  • Tree Top Down 3D
  • Tree Left Right 3D
  • Radial Out 2D
  • Radial Out 3D
  • Hierarchical Top Down 2D
  • Hierarchical Left Right 2D
  • No Overlap 2D
  • Force Atlas 2 2D

📦 Usage

Install the package via NPM:

npm i reagraph --save

Install the package via Yarn:

yarn add reagraph

Import the component into your app and add some nodes and edges:

import React from 'react';
import { GraphCanvas } from 'reagraph';

export default () => (
  <GraphCanvas
    nodes={[
      {
        id: 'n-1',
        label: '1'
      },
      {
        id: 'n-2',
        label: '2'
      }
    ]}
    edges={[
      {
        id: '1->2',
        source: 'n-1',
        target: 'n-2',
        label: 'Edge 1-2'
      }
    ]}
  />
);

Checkout an example on CodeSandbox.

🔭 Development

If you want to run reagraph locally, its super easy!

  • Clone the repo
  • npm i
  • npm start
  • Browser opens to Storybook page

❤️ Contributors

Thanks to all our contributors!

Keywords

FAQs

Package last updated on 13 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc