0.4.41 โ€ข Published 2 years ago

@braks/vue-flow v0.4.41

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Vue Flow ๐ŸŒŠ

Vue flow top-language vulnerabilities GitHub code size in bytes GitHub last commit

Vue Flow: A highly customizable Vue 3 Flowchart component.

With Vue Flow, you can build your own, customized node-based applications like static diagrams or even more complex and interactive editors!

You can find a detailed explanation of how to get started in the documentation or check the examples.

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 @braks/vue-flow

# or
$ yarn add @braks/vue-flow

๐ŸŽฎ Quickstart

A flow consists of nodes and edges (or just nodes). Together they are called elements.

Each element needs a unique id.

A node also needs an XY position. An edge needs a source (node id) and a target (node id).

A basic setup looks like this:

<!-- Flowchart.vue -->
<script setup>
import { VueFlow } from '@braks/vue-flow'

const elements = ref([
  {
    id: '1',
    label: 'node 1',
    position: { x: 100, y: 100 },
  },
  {
    id: '2',
    label: 'node 2',
    position: { x: 100, y: 200 },
  },
  {
    id: 'e1-2',
    target: '2',
    source: '1',
  },
])
</script>

<template>
  <VueFlow v-model="elements"></VueFlow>
</template>

โš ๏ธ Make sure to import the necessary styles:

/* import the required styles */
@import "@braks/vue-flow/dist/style.css";

/* import the default theme (optional) */
@import "@braks/vue-flow/dist/theme-default.css";

๐Ÿชด 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

# skip if you already have pnpm installed
$ 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 Discord

Join the Vue Flow Discord server!

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

    • Vue flow is heavily based on webkids' react flow. I wholeheartedly thank them for their amazing work! Without them Vue Flow would not exist. Please consider donating to them.
  • 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 @braks/vue-flow

0.4.41

2 years ago

0.4.40

2 years ago

0.4.39

2 years ago

0.4.38

2 years ago

0.4.31

2 years ago

0.4.32

2 years ago

0.4.30

2 years ago

0.4.37

2 years ago

0.4.35

2 years ago

0.4.36

2 years ago

0.4.33

2 years ago

0.4.34

2 years ago

0.4.20

2 years ago

0.4.21

2 years ago

0.4.28

2 years ago

0.4.29

2 years ago

0.4.26

2 years ago

0.4.27

2 years ago

0.4.24

2 years ago

0.4.25

2 years ago

0.4.22

2 years ago

0.4.23

2 years ago

0.4.19

2 years ago

0.4.17

2 years ago

0.4.18

2 years ago

0.4.15

2 years ago

0.4.16

2 years ago

0.4.13

2 years ago

0.4.14

2 years ago

0.4.12

2 years ago

0.4.9

2 years ago

0.4.10

2 years ago

0.4.11

2 years ago

0.4.2-4

2 years ago

0.4.2-3

2 years ago

0.4.7-0.pr92

2 years ago

0.4.8

2 years ago

0.4.0-34

2 years ago

0.4.0-32

2 years ago

0.4.0-33

2 years ago

0.4.0-30

2 years ago

0.4.0-31

2 years ago

0.4.2-2

2 years ago

0.4.2-1

2 years ago

0.4.2-0

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.7

2 years ago

0.4.6

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.4.0-8

2 years ago

0.4.0-7

2 years ago

0.4.0-6

2 years ago

0.4.0-5

2 years ago

0.4.0-9

2 years ago

0.4.0-4

2 years ago

0.4.0-18

2 years ago

0.4.0-19

2 years ago

0.4.0-16

2 years ago

0.4.0-17

2 years ago

0.4.0-14

2 years ago

0.4.0-15

2 years ago

0.4.0-12

2 years ago

0.4.0-13

2 years ago

0.4.0-10

2 years ago

0.4.0-11

2 years ago

0.4.0-29

2 years ago

0.4.0-27

2 years ago

0.4.0-28

2 years ago

0.4.0-25

2 years ago

0.4.0-26

2 years ago

0.4.0-23

2 years ago

0.4.0-24

2 years ago

0.4.0-21

2 years ago

0.4.0-22

2 years ago

0.4.0-20

2 years ago

0.4.0-3

2 years ago

0.4.0-0

2 years ago

0.4.0-2

2 years ago

0.4.0-1

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.34

2 years ago

0.1.0

2 years ago

0.3.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.26

2 years ago

0.1.7

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.1.4

2 years ago

0.3.1

2 years ago

0.1.3

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.2.1

2 years ago

0.0.3

2 years ago

0.2.0

2 years ago

0.0.2

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.2.2

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.1

2 years ago