Reaflow

React library for building workflow editors, flow charts and diagrams

README

🕸 reaflow


  Node-based Visualizations for React


Open Collective backers and sponsors


REAFLOW is a modular diagram engine for building static or interactive editors. The library is feature-rich and modular allowing for displaying complex
visualizations with total customizability.

If you are looking for network graphs, checkout reagraph.

🚀 Quick Links


- Checkout the [docs and demos](https://reaflow.dev)
- Explore the library on Chroma
- Learn about updates from the Changelog

✨ Features


- Complex automatic layout leveraging ELKJS
- Easy Node/Edge/Port customizations
- Zooming / Panning / Centering controls
- Drag and drop Node/Port connecting and rearranging
- Nesting of Nodes/Edges
- Proximity based Node linking helper
- Node/Edge selection helper
- Undo/Redo helper

📦 Usage


Install the package via NPM:

  1. ```
  2. npm i reaflow --save
  3. ```

Install the package via Yarn:

  1. ```
  2. yarn add reaflow
  3. ```

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

  1. ``` js
  2. import React from 'react';
  3. import { Canvas } from 'reaflow';

  4. export default () => (
  5.   <Canvas
  6.     maxWidth={800}
  7.     maxHeight={600}
  8.     nodes={[
  9.       {
  10.         id: '1',
  11.         text: '1'
  12.       },
  13.       {
  14.         id: '2',
  15.         text: '2'
  16.       }
  17.     ]}
  18.     edges={[
  19.       {
  20.         id: '1-2',
  21.         from: '1',
  22.         to: '2'
  23.       }
  24.     ]}
  25.   />
  26. );
  27. ```

🔭 Development


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

- Clone the repo
- yarn install
- yarn start
- Browser opens to Storybook page

❤️ Contributors


Thanks to all our contributors!