Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bcakmakoglu/vue-flow
A highly customizable Flowchart component for Vue 3. Features seamless zoom & pan ๐, additional components like a Minimap ๐บ and utilities to interact with state and graph.
https://github.com/bcakmakoglu/vue-flow
diagrams flow flowchart javascript turborepo typescript vite vitepress vue vue3
Last synced: 7 days ago
JSON representation
A highly customizable Flowchart component for Vue 3. Features seamless zoom & pan ๐, additional components like a Minimap ๐บ and utilities to interact with state and graph.
- Host: GitHub
- URL: https://github.com/bcakmakoglu/vue-flow
- Owner: bcakmakoglu
- License: mit
- Created: 2021-07-01T17:52:34.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-15T21:42:03.000Z (6 months ago)
- Last Synced: 2024-05-16T13:53:29.666Z (6 months ago)
- Topics: diagrams, flow, flowchart, javascript, turborepo, typescript, vite, vitepress, vue, vue3
- Language: TypeScript
- Homepage: https://vueflow.dev/
- Size: 15.1 MB
- Stars: 2,992
- Watchers: 29
- Forks: 201
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
- awesome-node-based-uis - vue-flow - Flowchart component for Vue 3 (Javascript Libraries / Renderers)
- awesome - bcakmakoglu/vue-flow - A highly customizable Flowchart component for Vue 3. Features seamless zoom & pan ๐, additional components like a Minimap ๐บ and utilities to interact with state and graph. (TypeScript)
- awesome - bcakmakoglu/vue-flow - A highly customizable Flowchart component for Vue 3. Features seamless zoom & pan ๐, additional components like a Minimap ๐บ and utilities to interact with state and graph. (TypeScript)
- awesome - bcakmakoglu/vue-flow - A highly customizable Flowchart component for Vue 3. Features seamless zoom & pan ๐, additional components like a Minimap ๐บ and utilities to interact with state and graph. (TypeScript)
README
# Vue Flow ๐
[![Vue flow](vue-flow.gif)](https://vueflow.dev/)
![top-language](https://img.shields.io/github/languages/top/bcakmakoglu/vue-flow)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/bcakmakoglu/vue-flow)
![GitHub last commit](https://img.shields.io/github/last-commit/bcakmakoglu/vue-flow)__Vue Flow: A highly customizable Vue 3 Flowchart component.__
You can find a detailed explanation on how to get started [here](https://vueflow.dev/guide/)
or jump right into the [examples](https://vueflow.dev/examples/).## Table of contents
* [โญ๏ธ Features](#-features)
* [๐ Setup](#-setup)
* [๐ฎ Quickstart](#-quickstart)
+ [๐ชด Vue 2](#-vue-2)
* [๐งช Development](#-development)
+ [๐ณ Dev Container](#-dev-container)
* [![discord logo](https://api.iconify.design/logos:discord-icon.svg) Discord](#-discord)
* [๐ Special Thanks](#-special-thanks)
* [โญ Stargazers](#-stargazers)
## โญ๏ธ Features
- ๐ถ __Easy setup__: Get started hassle-free - Built-in zoom- & pan features, element dragging, selection and much more
- ๐จ __Customizable__: Use your custom nodes, edges and connection lines and expand on Vue Flows' functionality
- ๐ __Fast__: Tracks changes reactively and only re-renders the appropriate elements
- ๐งฒ __Utils & Composition__: Comes with graph helper and state composable functions for advanced uses
- ๐ฆ __Additional Components__:
- ๐ผ Background: With two built-in patterns and some configuration options like height, width or color.
- ๐งญ Minimap: Shows current nodes in a small map shape in the bottom right corner
- ๐น Controls: Control zoom behavior from a panel on the bottom left
- ๐ค And (many) more to come...
- ๐ฆพ __Reliable__: Fully written in TypeScript
## ๐ Setup
```bash
$ npm i @vue-flow/core# or
$ pnpm i @vue-flow/core# or
$ yarn add @vue-flow/core
```## ๐ฎ Quickstart
In Vue Flow, an application structure consists of __nodes__ and __edges__, all of which are categorised as __elements__.
__Each element requires a unique id.__
Nodes additionally need an __XY-position__, while edges require a __source__ and a __target__, both represented by node ids.
```vue
import { ref } from 'vue'
import { VueFlow } from '@vue-flow/core'const nodes = ref([
{ id: '1', type: 'input', label: 'Node 1', position: { x: 250, y: 5 } },
{ id: '2', label: 'Node 2', position: { x: 100, y: 100 } },
{ id: '3', label: 'Node 3', position: { x: 400, y: 100 } },
{ id: '4', label: 'Node 4', position: { x: 400, y: 200 } },
])
const edges = ref([
{ id: 'e1-2', source: '1', target: '2', animated: true },
{ id: 'e1-3', source: '1', target: '3' },
])
```
โ ๏ธ __Make sure to import the necessary styles:__
```css
/* import the required styles */
@import "@vue-flow/core/dist/style.css";/* import the default theme (optional) */
@import "@vue-flow/core/dist/theme-default.css";
```Do __not__ scope these styles with `scoped` in your component.
### ๐ชด Vue 2
**_This library doesn't work with Vue 2._**
Vue Flow uses features that are exclusive to Vue 3, therefore
there is no support for Vue 2, nor will there be any support in the future, sorry.## ๐งช Development
### Prerequisites
- [Node.js v20+](https://nodejs.org/)
- [pnpm v9+](https://pnpm.io/)```bash
# install pnpm if you haven't already
$ npm i -g pnpm# start examples
$ pnpm dev# build all packages
$ pnpm build
```### ๐ณ Dev Container
To start using development containers, install the `Docker` extension
for VSCode.
After installing the extension, open the connection menu either
on the bottom left or open it via the commands tab.
Select the `Open Folder in Container` option to mount the project.The development container will spin up all packages example apps and forward
the ports to your machine.## ![discord logo](https://api.iconify.design/logos:discord-icon.svg) Discord
[Join the Vue Flow Discord server!](https://discord.gg/rwt6CBk4b5)
Here you can ask questions to the community, propose ideas for new features
or share your work that you have built with Vue Flow.## ๐ Special Thanks
This project is built with
- [React Flow](https://reactflow.dev/)
- Vue flow is heavily based on [webkids'](https://webkid.io/) [ReactFlow](https://reactflow.dev/). I wholeheartedly
thank them for their amazing work! Without them VueFlow would not exist.
Please consider [donating](https://github.com/sponsors/wbkd) or subscribing to [ReactFlow Pro](https://reactflow.dev/pro).- [D3.js](https://d3js.org/)
- D3 makes all the zoom and pan actions in Vue Flow possible.- [VueUse](https://vueuse.org/)
- VueUse is a collection of essential vue composition utilities## โญ Stargazers
Many thanks to the kind individuals who leave a star.
Your support is much appreciated![![Stargazers for @vue-flow/core](https://reporoster.com/stars/bcakmakoglu/vue-flow)](https://github.com/bcakmakoglu/vue-flow/stargazers)