Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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.

License

NotificationsYou must be signed in to change notification settings

bcakmakoglu/vue-flow

Repository files navigation

Vue flowtop-languageGitHub code size in bytesGitHub last commit

Vue Flow: A highly customizable Vue 3 Flowchart component.

You can find a detailed explanation on how to get startedhereor jump right into theexamples.

Table of contents

⭐️ 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

$ 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 ofnodes andedges, all of which are categorised aselements.

Each element requires a unique id.

Nodes additionally need anXY-position, while edges require asource and atarget, both represented by node ids.

<!-- Flowchart.vue--><script setup>import {ref }from'vue'import {VueFlow }from'@vue-flow/core'constnodes=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 } },])constedges=ref([  { id:'e1-2', source:'1', target:'2', animated:true },  { id:'e1-3', source:'1', target:'3' },])</script><template>  <VueFlowv-model:nodes="nodes"v-model:edges="edges"></VueFlow></template>

⚠️Make sure to import the necessary styles:

/* import the required styles */@import"@vue-flow/core/dist/style.css";/* import the default theme (optional) */@import"@vue-flow/core/dist/theme-default.css";

Donot scope these styles withscoped in your component.

🪴 Vue 2

This library doesn't work with Vue 2.

Vue Flow uses features that are exclusive to Vue 3, thereforethere is no support for Vue 2, nor will there be any support in the future, sorry.

🧪 Development

Prerequisites

# 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 theDocker extensionfor VSCode.After installing the extension, open the connection menu eitheron the bottom left or open it via the commands tab.Select theOpen Folder in Container option to mount the project.

The development container will spin up all packages example apps and forwardthe ports to your machine.

discord logo Discord

Join the Vue Flow Discord server!

Here you can ask questions to the community, propose ideas for new featuresor share your work that you have built with Vue Flow.

💝 Special Thanks

This project is built with

  • React Flow

    • Vue flow is heavily based onwebkids'ReactFlow. I wholeheartedlythank them for their amazing work! Without them VueFlow would not exist.Please considerdonating or subscribing toReactFlow Pro.
  • D3.js

    • D3 makes all the zoom and pan actions in Vue Flow possible.
  • VueUse

    • 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

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors27


[8]ページ先頭

©2009-2025 Movatter.jp