Skip to content

Commit c24287d

Browse files
committed
chore: update README.md
1 parent e64ab35 commit c24287d

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

README.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
[![Vue flow](vue-flow.gif)](https://vueflow.dev/)
44
![top-language](https://img.shields.io/github/languages/top/bcakmakoglu/vue-flow)
5-
![vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/bcakmakoglu/vue-flow)
65
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/bcakmakoglu/vue-flow)
76
![GitHub last commit](https://img.shields.io/github/last-commit/bcakmakoglu/vue-flow)
87

98
__Vue Flow: A highly customizable Vue 3 Flowchart component.__
109

11-
With Vue Flow, you can build your own, customized node-based applications like static diagrams or even more complex and
12-
interactive editors!
10+
Vue Flow is a bridge to the world of interactive flowcharts and graphs, empowering you to bring
11+
interactivity to your graphic representations. Whether it's crafting personal diagrams, generating dynamic
12+
editors, or anything else your imagination conjures up, Vue Flow has you covered.
1313

14-
You can find a detailed explanation of how to get started in the [documentation](https://vueflow.dev/guide/) or check
14+
You can find a detailed explanation on how to get started [here](https://vueflow.dev/guide/) or jump right into
1515
the [examples](https://vueflow.dev/examples/).
1616

1717
## Table of contents
@@ -21,11 +21,11 @@ the [examples](https://vueflow.dev/examples/).
2121
* [🛠 Setup](#-setup)
2222

2323
* [🎮 Quickstart](#-quickstart)
24-
24+
2525
+ [🪴 Vue 2](#-vue-2)
2626

2727
* [🧪 Development](#-development)
28-
28+
2929
+ [🐳 Dev Container](#-dev-container)
3030

3131
* [![discord logo](https://api.iconify.design/logos:discord-icon.svg) Discord](#-discord)
@@ -61,38 +61,40 @@ the [examples](https://vueflow.dev/examples/).
6161
```bash
6262
$ npm i @vue-flow/core
6363

64+
# or
65+
$ pnpm i @vue-flow/core
66+
6467
# or
6568
$ yarn add @vue-flow/core
6669
```
6770

6871
## 🎮 Quickstart
6972

70-
A flow consists of __nodes__ and __edges__ (or just nodes).
71-
Together they are called __elements__.
73+
In Vue Flow, an application structure consists of __nodes__ and __edges__, all of which are categorised as __elements__.
7274

73-
__Each element needs a unique id.__
75+
__Each element requires a unique id.__
7476

75-
A node also needs an XY position.
76-
An edge needs a source (node id) and a target (node id).
77-
78-
A basic setup looks like this:
77+
Nodes additionally need an __XY-position__, while edges require a __source__ and a __target__, both represented by node ids.
7978

8079
```vue
8180
<!-- Flowchart.vue -->
8281
<script setup>
8382
import { VueFlow } from '@vue-flow/core'
8483
85-
const elements = ref([
84+
const nodes = ref([
8685
{
8786
id: '1',
8887
label: 'node 1',
89-
position: { x: 100, y: 100 },
88+
position: {x: 100, y: 100},
9089
},
9190
{
9291
id: '2',
9392
label: 'node 2',
94-
position: { x: 100, y: 200 },
93+
position: {x: 100, y: 200},
9594
},
95+
])
96+
97+
const edges = ref([
9698
{
9799
id: 'e1-2',
98100
target: '2',
@@ -102,11 +104,10 @@ const elements = ref([
102104
</script>
103105
104106
<template>
105-
<VueFlow v-model="elements"></VueFlow>
107+
<VueFlow :nodes="nodes" :edges="edges"></VueFlow>
106108
</template>
107109
```
108110

109-
110111
⚠️ __Make sure to import the necessary styles:__
111112

112113
```css
@@ -117,6 +118,8 @@ const elements = ref([
117118
@import "@vue-flow/core/dist/theme-default.css";
118119
```
119120

121+
Do __not__ scope these styles with `scoped` in your component.
122+
120123
### 🪴 Vue 2
121124

122125
**_This library doesn't work with Vue 2._**
@@ -128,12 +131,11 @@ there is no support for Vue 2, nor will there be any support in the future, sorr
128131

129132
### Prerequisites
130133

131-
- [Node.js v14+](https://nodejs.org/)
132-
- [PnPm](https://pnpm.io/)
133-
134+
- [Node.js v18+](https://nodejs.org/)
135+
- [pnpm](https://pnpm.io/)
134136

135137
```bash
136-
# skip if you already have pnpm installed
138+
# install pnpm if you haven't already
137139
$ npm i -g pnpm
138140

139141
# start examples
@@ -166,9 +168,9 @@ or share your work that you have built with Vue Flow.
166168
This project is built with
167169

168170
- [React Flow](https://reactflow.dev/)
169-
- Vue flow is heavily based on [webkids'](https://webkid.io/) [react flow](https://reactflow.dev/). I wholeheartedly thank
170-
them for their amazing work! Without them Vue Flow would not exist.
171-
Please consider [donating](https://github.com/sponsors/wbkd) to them.
171+
- Vue flow is heavily based on [webkids'](https://webkid.io/) [ReactFlow](https://reactflow.dev/). I wholeheartedly
172+
thank them for their amazing work! Without them VueFlow would not exist.
173+
Please consider [donating](https://github.com/sponsors/wbkd) or subscribing to [ReactFlow Pro](https://reactflow.dev/pro).
172174

173175
- [D3.js](https://d3js.org/)
174176
- D3 makes all the zoom and pan actions in Vue Flow possible.

0 commit comments

Comments
 (0)