All Projects → MrBlenny → React Flow Chart

MrBlenny / React Flow Chart

Licence: mit
A flexible, stateless, declarative flow chart library for react.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to React Flow Chart

Flowy Vue
Vue Flowy makes creating flowchart or hierarchy chart functionality an easy task. Build automation software, mind mapping tools, organisation charts, or simple programming platforms in minutes by implementing the library into your project.
Stars: ✭ 107 (-89.82%)
Mutual labels:  diagram, drag-and-drop, flowchart
Mermaid
Provides a parser function to generate diagrams and flowcharts with the help of the mermaid script language
Stars: ✭ 27 (-97.43%)
Mutual labels:  diagram, diagrams, flowchart
Diagram Maker
A library to display an interactive editor for any graph-like data.
Stars: ✭ 2,086 (+98.48%)
Mutual labels:  diagram, diagrams, flowchart
Flowy
The minimal javascript library to create flowcharts ✨
Stars: ✭ 8,636 (+721.69%)
Mutual labels:  diagrams, drag-and-drop, flowchart
Grafana Flowcharting
Flowcharting, plugin for Grafana to create complexe visio's draws style like technical architectures, floorplan, diagrams, hierarchical schema based on draw.io
Stars: ✭ 463 (-55.95%)
Mutual labels:  diagram, diagrams, flowchart
bpmn
BPMN diagrams in R
Stars: ✭ 16 (-98.48%)
Mutual labels:  diagram, flowchart
Mxgraph-EasyFlowEditor
基于mxGraph+vue设计的流程图编辑器
Stars: ✭ 73 (-93.05%)
Mutual labels:  diagram, flowchart
Madara
✍️ A way for people to manage their tasks.
Stars: ✭ 17 (-98.38%)
Mutual labels:  styled-components, drag-and-drop
Heimer
Heimer is a simple cross-platform mind map, diagram, and note-taking tool written in Qt.
Stars: ✭ 380 (-63.84%)
Mutual labels:  diagram, flowchart
React Bootstrap Webpack Starter
ReactJS 16.4 + new React Context API +react Router 4 + webpack 4 + babel 7+ hot Reload + Bootstrap 4 + styled-components
Stars: ✭ 103 (-90.2%)
Mutual labels:  webpack4, styled-components
visioStencils
My 2,700 visio 🎨 shapes, stencils, symbols, and icons collection to visually represent IT infrastructure
Stars: ✭ 43 (-95.91%)
Mutual labels:  diagram, diagrams
Vue Chartjs
📊 Vue.js wrapper for Chart.js
Stars: ✭ 4,554 (+333.3%)
Mutual labels:  diagram, diagrams
dragonfly-dag
完全支持Vue3和Vitejs的DAG流程图组件
Stars: ✭ 54 (-94.86%)
Mutual labels:  diagram, flowchart
mermaid.ink
Given a mermaid code (markdown-like), serve an image for you
Stars: ✭ 43 (-95.91%)
Mutual labels:  diagrams, flowchart
Styled React Boilerplate
Minimal & Modern boilerplate for building apps with React & styled-components
Stars: ✭ 198 (-81.16%)
Mutual labels:  webpack4, styled-components
react-direct-graph
📏 React component for drawing direct graphs with rectangular (non-curve) edges.
Stars: ✭ 25 (-97.62%)
Mutual labels:  diagram, flowchart
React Boilerplate
🔥 A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices.
Stars: ✭ 28,151 (+2578.5%)
Mutual labels:  webpack4, styled-components
Gojs
JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.
Stars: ✭ 5,739 (+446.05%)
Mutual labels:  diagram, flowchart
Jsplumb
Visual connectivity for webapps
Stars: ✭ 6,758 (+543.01%)
Mutual labels:  diagram, flowchart
Cloudskew
Create free cloud architecture diagrams
Stars: ✭ 183 (-82.59%)
Mutual labels:  diagram, diagrams

React Flow Chart

CircleCI

  • [X] Dragabble Nodes and Canvas
  • [x] Create curved links between ports
  • [x] Custom components for Canvas, Links, Ports, Nodes
  • [X] React state container
  • [X] Update state on Select/Hover nodes, ports and links
  • [x] Base functionality complete
  • [X] Stable NPM version
  • [X] Scroll/Pinch canvas to zoom
  • [ ] Ctrl+z/Ctrl+y history
  • [X] Read-only mode
  • [ ] Redux state container
  • [ ] Arrow heads on links
  • [ ] Docs

Storybook Demo

CodeSandbox Demo

This project aims to build a highly customisable, declarative flow chart library. Critically, you control the state. Pick from Redux, MobX, React or any other state managment library - simply pass in the current state and hook up the callbacks.

For example:

demo

Data Stucture

The flow chart is designed as a collection of Nodes, Ports and Links. You can specify your own custom properties, making this format quite flexible. See types/chart.ts. Note, nodes, ports and links should have a unique id.

Example

export const chart: IChart = {
  offset: {
    x: 0,
    y: 0,
  },
  scale: 1,
  nodes: {
    node1: {
      id: 'node1',
      type: 'output-only',
      position: {
        x: 300,
        y: 100,
      },
      ports: {
        port1: {
          id: 'port1',
          type: 'output',
          properties: {
            value: 'yes',
          },
        },
        port2: {
          id: 'port2',
          type: 'output',
          properties: {
            value: 'no',
          },
        },
      },
    },
    node2: {
      id: 'node2',
      type: 'input-output',
      position: {
        x: 300,
        y: 300,
      },
      ports: {
        port1: {
          id: 'port1',
          type: 'input',
        },
        port2: {
          id: 'port2',
          type: 'output',
        },
      },
    },
  },
  links: {
    link1: {
      id: 'link1',
      from: {
        nodeId: 'node1',
        portId: 'port2',
      },
      to: {
        nodeId: 'node2',
        portId: 'port1',
      },
    },
  },
  selected: {},
  hovered: {},
}

This will produce a simple 2 noded chart which looks like:

Demo

Basic Usage

npm i @mrblenny/react-flow-chart

Most components/types are available as a root level export. Check the storybook demo for more examples.

import { FlowChartWithState } from "@mrblenny/react-flow-chart";

const chartSimple = {
  offset: {
    x: 0,
    y: 0
  },
  nodes: {
    node1: {
      id: "node1",
      type: "output-only",
      position: {
        x: 300,
        y: 100
      },
      ports: {
        port1: {
          id: "port1",
          type: "output",
          properties: {
            value: "yes"
          }
        },
        port2: {
          id: "port2",
          type: "output",
          properties: {
            value: "no"
          }
        }
      }
    },
    node2: {
      id: "node2",
      type: "input-output",
      position: {
        x: 300,
        y: 300
      },
      ports: {
        port1: {
          id: "port1",
          type: "input"
        },
        port2: {
          id: "port2",
          type: "output"
        }
      }
    },
  },
  links: {
    link1: {
      id: "link1",
      from: {
        nodeId: "node1",
        portId: "port2"
      },
      to: {
        nodeId: "node2",
        portId: "port1"
      },
    },
  },
  selected: {},
  hovered: {}
};

const Example = (
  <FlowChartWithState initialValue={chartSimple} />
);

With Internal State

stories/InternalReactState.tsx

With External State

stories/ExternalReactState.tsx

Readonly Mode

stories/ReadonlyMode.tsx

Other Demos

stories/ExternalReactState.tsx

Contributing

If you're interested in helping out, let me know.

In particular, would be great to get a hand with docs and redux / mobx integrations.

Development

npm install
npm run start:storybook
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].