Packages
Here we list all React Flow packages that we are publishing on npm.
Main Package
We recommend to use the reactflow
package. It contains the following packages:
These packages are not part of the main package and need to be installed separately:
Installation
- npm
- yarn
- pnpm
npm install reactflow
yarn add reactflow
pnpm add reactflow
All examples and guides are using the reactflow
package. If you only want to use parts of it, you can install the sub packages.
Sub Packages
The reactflow
package contains multiple packages that can be installed separately. All packages are published under the @reactflow
organization on npm. All of the following packages only use named exports.
@reactflow/core
The core package exports the main <ReactFlow />
component, the <ReactFlowProvider />
, all hooks and all util functions:
Installation
- npm
- yarn
- pnpm
npm install @reactflow/core
yarn add @reactflow/core
pnpm add @reactflow/core
Usage
import { ReactFlow, useReactFlow } from '@reactflow/core';
@reactflow/background
This package exports the Background component.
Installation
- npm
- yarn
- pnpm
npm install @reactflow/background
yarn add @reactflow/background
pnpm add @reactflow/background
Usage
import { Background } from '@reactflow/background';
@reactflow/controls
This package exports the Controls and ControlButton component.
Installation
- npm
- yarn
- pnpm
npm install @reactflow/controls
yarn add @reactflow/controls
pnpm add @reactflow/controls
Usage
import { Controls, ControlButton } from '@reactflow/controls';
@reactflow/minimap
This package exports the MiniMap component.
Installation
- npm
- yarn
- pnpm
npm install @reactflow/minimap
yarn add @reactflow/minimap
pnpm add @reactflow/minimap
Usage
import { MiniMap } from '@reactflow/minimap';
@reactflow/node-toolbar
This package exports the NodeToolbar component.
Installation
- npm
- yarn
- pnpm
npm install @reactflow/node-toolbar
yarn add @reactflow/node-toolbar
pnpm add @reactflow/node-toolbar
Usage
import { NodeToolbar } from '@reactflow/node-toolbar';
@reactflow/node-resizer
This package exports the NodeResizer component.
Installation
- npm
- yarn
- pnpm
npm install @reactflow/node-resizer
yarn add @reactflow/node-resizer
pnpm add @reactflow/node-resizer
Usage
import { NodeResizer, NodeResizeControl } from '@reactflow/node-resizer';