Installation
Vue Flow is distributed as an npm package. You can install it using your preferred package manager.Prerequisites
Before installing Vue Flow, make sure you have:- Node.js v20 or above installed
- Vue 3.3 or above in your project
Install the Package
Choose your preferred package manager to install the core Vue Flow package:Import Required Styles
Vue Flow requires CSS styles to work correctly. Import these styles in your main application file or component:The base styles (
style.css) are required for Vue Flow to function properly. The default theme (theme-default.css) is optional but provides sensible defaults for nodes and edges.Example Setup
Here’s how to import the styles in your main application file:Optional Packages
Vue Flow offers additional packages for extended functionality:Background
Add customizable background patterns to your flow:MiniMap
Display a mini overview map of your flow:Controls
Add interactive zoom and control buttons:Node Toolbar
Add contextual toolbars to your nodes:Node Resizer
Enable node resizing functionality:TypeScript Support
Vue Flow is written entirely in TypeScript and includes type definitions out of the box. No additional packages are needed for TypeScript support.For the best developer experience and to catch common errors early, we highly recommend using TypeScript with Vue Flow.
Verify Installation
To verify that Vue Flow is installed correctly, create a simple flow:Make sure to set a height on the VueFlow container element. Without a defined height, the component won’t be visible.
Next Steps
Quick Start Guide
Learn how to create your first interactive flowchart with Vue Flow