GithubHelp home page GithubHelp logo

isabella232 / react-flow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zendesk/react-flow

0.0 0.0 0.0 22.82 MB

Highly customizable library for building interactive node-based UIs, editors, flow charts and diagrams

Home Page: https://reactflow.dev

License: MIT License

JavaScript 13.16% CSS 2.55% TypeScript 84.29%

react-flow's Introduction

react-flow

React Flow is a library for building node-based graphs. You can easily implement custom node types and it comes with components like a mini-map and graph controls. Feel free to check out the examples or read the blog post to get started.

Installation

npm install react-flow-renderer

Quick Start

This is a very basic example of how to use React Flow. You can find more advanced examples on the website.

import React from 'react';
import ReactFlow from 'react-flow-renderer';

const elements = [
  { id: '1', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
  // you can also pass a React component as a label
  { id: '2', data: { label: <div>Node 2</div> }, position: { x: 100, y: 100 } },
  { id: 'e1-2', source: '1', target: '2', animated: true },
];

const BasicFlow = () => <ReactFlow elements={elements} />;

Development

Before you start you need to install the React Flow dependencies via npm install and the ones of the examples cd example && npm install.

If you want to contribute or develop custom features the easiest way is to start the dev server:

npm start

and the example app via:

cd example && npm start 

The example app serves the content of the example folder and watches changes inside the src folder. The examples are using the source of the src folder.

Testing

Testing is done with cypress. You can find the tests in the integration/flow folder. In order to run the tests do:

npm run test

Support

If you need custom support or features for your application we are happy to hear from you.

Thanks!

Special thanks to Andy Lindemann for a lot of helpful contributions!


React Flow is maintained by webkid, a data visualization agency from Berlin. If you need help or want to develop react-based tools or data visualizations, get in touch!

react-flow's People

Contributors

100le avatar alvarezgarcia avatar amirsaeed671 avatar andys8 avatar ashwanthkumar avatar chiester avatar chrtze avatar dependabot-preview[bot] avatar emiel-betty avatar harana-bot avatar is343 avatar jasonpul avatar justrhysism avatar kid-icarus avatar michaeltheobald avatar moklick avatar namack avatar ryanwr avatar shaman123 avatar theunderscorer avatar timhwang21 avatar zcmgyu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.