A highly customizable React component for building interactive graphs and node-based editors.
🚀 Getting Started | 📖 Documentation | 📺 Examples | ☎️ Discord | 💎 React Flow Pro
React Flow includes a small attribution that links to the React Flow website. We expect companies who are using React Flow commercially to subscribe to React Flow Pro if they want to remove the attribution. By subscribing you get access to other exclusive services like advanced examples, individual support or prioritized bug reports. In non-commercial applications you may hide the attribution without subscribing but are welcome to sponsor us on Github.
You can find more information in our React Flow Pro FAQs.
The easiest way to get the latest version of React Flow is to install it via npm:
npm install react-flow-renderer
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 build the project using npm run build
. Then 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 is done with cypress. You can find the tests in the integration/flow
folder. In order to run the tests do:
npm run test
React Flow is developed and maintained by webkid, a web development agency with 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.
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:
React Flow is MIT licensed.