Giter VIP home page Giter VIP logo

react-flow's Introduction

readme-header-dark readme-header

GitHub License MIT npm downloads GitHub Repo stars GitHub release (latest by date)

Wire Your Ideas With React Flow!

A highly customizable React component for building interactive graphs and node-based editors.

πŸš€ Getting Started | πŸ“– Documentation | πŸ“Ί Examples | ☎️ Discord | πŸ’Ž React Flow Pro


Key Features

  • Easy to use: Seamless zooming and panning, single- and multi selection of graph elements and keyboard shortcuts are supported out of the box
  • Customizable: Different node and edge types and support for custom nodes with multiple handles and custom edges
  • Fast rendering: Only nodes that have changed are re-rendered and only those in the viewport are displayed
  • Hooks and Utils: Hooks for handling nodes, edges and the viewport and graph helper functions
  • Plugin Components: Background, MiniMap and Controls
  • Reliable: Written in Typescript and tested with cypress

Attribution

React Flow includes a small attribution that links to the React Flow website. Per default the attribution is displayed in the bottom right corner. With the attribution we want to achieve that companies who are using React Flow in commercial applications finance the development of the library. We expect users who are using React Flow commercially to subscribe to React Flow Pro if they want to remove the attribution. In non-commercial applications you may hide the attribution without subscribing but are welcome to sponsor us on Github.

Installation

The easiest way to get the latest version of React Flow is to install it via npm:

npm install react-flow-renderer

Quick Start

This is only a very basic usage example of React Flow. To see everything that is possible with the library, please refer to the website for guides, examples and API reference.

import ReactFlow, { MiniMap, Controls } from 'react-flow-renderer';

function Flow({ nodes, edges, onNodesChange, onEdgesChange, onConnect }) {
  return (
    <ReactFlow
      nodes={nodes}
      edges={edges}
      onNodesChange={onNodesChange}
      onEdgesChange={onEdgesChange}
      onConnect={onConnect}
    >
      <MiniMap />
      <Controls />
    </ReactFlow>
  );
}

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

Maintainers

React Flow is developed and maintained by webkid, a web development agency with the focus on data driven applications from Berlin. If you need help or want to talk to us about a collaboration, feel free to contact us:

You can also use our contact form or join the React Flow Discord Server.

Community Packages

Credits

React Flow was initially developed for datablocks, a graph-based editor for transforming, analyzing and visualizing data in your browser. Under the hood, React Flow depends on these great libraries:

  • d3-zoom - used for zoom, pan and drag interactions with the graph canvas
  • react-draggable - used for making the nodes draggable
  • zustand - internal state management

License

React Flow is MIT licensed.

react-flow's People

Contributors

moklick avatar dependabot-preview[bot] avatar chrtze avatar dependabot[bot] avatar namack avatar verluci avatar alvarezgarcia avatar joeyballentine avatar jasonpul avatar shaman123 avatar mahdi-esbati avatar himself65 avatar zcmgyu avatar andys8 avatar chiester avatar rickeyward avatar ark-kun avatar theunderscorer avatar justrhysism avatar spencerwhitehead7 avatar andreyworkspace avatar philgarb avatar kid-icarus avatar ryanwr avatar 100le avatar datoslabs avatar doctoroyy avatar seonghojin avatar timhwang21 avatar emilienleroux avatar

Stargazers

Rija Nifaliana 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.