A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/bcakmakoglu/vue-flow below:

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.

Vue Flow: A highly customizable Vue 3 Flowchart component.

You can find a detailed explanation on how to get started here or jump right into the examples.

$ npm i @vue-flow/core

# or
$ pnpm i @vue-flow/core

# or
$ yarn add @vue-flow/core

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.

<!-- Flowchart.vue -->
<script setup>
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' },
])
</script>

<template>
  <VueFlow v-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";

Do not scope these styles with scoped in your component.

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.

# install pnpm if you haven't already
$ npm i -g pnpm

# start examples
$ pnpm dev

# build all packages
$ pnpm build

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

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.

This project is built with

Many thanks to the kind individuals who leave a star. Your support is much appreciated!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4