File tree Expand file tree Collapse file tree 6 files changed +49
-7
lines changed
docs/src/guide/components Expand file tree Collapse file tree 6 files changed +49
-7
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,18 @@ npm install @vue-flow/background
1616To use the background simply pass the ` Background ` component as a child to the ` VueFlow ` component.
1717
1818``` vue
19+ <script setup>
20+ import { VueFlow } from '@vue-flow/core'
21+ import { Background } from '@vue-flow/background'
22+ import initialElements from './initial-elements'
23+
24+ // some nodes and edges
25+ const elements = ref(initialElements)
26+ </script>
27+
1928<template>
20- <VueFlow>
21- <Background :variant="BackgroundVariant.Dots" pattern-color="#f8f8f8" />
29+ <VueFlow v-model="elements" fit-view-on-init class="vue-flow-basic-example" >
30+ <Background />
2231 </VueFlow>
2332</template>
2433```
Original file line number Diff line number Diff line change @@ -15,14 +15,33 @@ npm install @vue-flow/controls
1515
1616To use the controls simply pass the ` Controls ` component as a child to the ` VueFlow ` component.
1717
18+ ::: warning
19+ Make sure you also import the styles as these are * not* part of the default theme anymore.
20+ :::
21+
1822``` vue
23+ <script setup>
24+ import { VueFlow } from '@vue-flow/core'
25+ import { Controls } from '@vue-flow/controls'
26+
27+ // import default controls styles
28+ import '@vue-flow/controls/dist/style.css'
29+
30+ import initialElements from './initial-elements'
31+
32+
33+ // some nodes and edges
34+ const elements = ref(initialElements)
35+ </script>
36+
1937<template>
20- <VueFlow>
38+ <VueFlow v-model="elements" fit-view-on-init class="vue-flow-basic-example" >
2139 <Controls />
2240 </VueFlow>
2341</template>
2442```
2543
44+
2645## [ Props] ( /typedocs/interfaces/ControlProps )
2746
2847| Name | Definition | Type | Optional | Default |
Original file line number Diff line number Diff line change @@ -13,9 +13,26 @@ npm install @vue-flow/minimap
1313
1414To use the minimap simply pass the ` MiniMap ` component as a child to the ` VueFlow ` component.
1515
16+ ::: warning
17+ Make sure you also import the styles as these are * not* part of the default theme anymore.
18+ :::
19+
1620``` vue
21+ <script setup>
22+ import { VueFlow } from '@vue-flow/core'
23+ import { MiniMap } from '@vue-flow/minimap'
24+
25+ // import default minimap styles
26+ import '@vue-flow/minimap/dist/style.css'
27+
28+ import initialElements from './initial-elements'
29+
30+ // some nodes and edges
31+ const elements = ref(initialElements)
32+ </script>
33+
1734<template>
18- <VueFlow>
35+ <VueFlow v-model="elements" fit-view-on-init class="vue-flow-basic-example" >
1936 <MiniMap />
2037 </VueFlow>
2138</template>
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ $ npm i --save @vue-flow/background
1616## 🎮 Quickstart
1717
1818``` vue
19-
2019<script setup>
2120import { VueFlow } from '@vue-flow/core'
2221import { Background } from '@vue-flow/background'
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ $ npm i --save @vue-flow/controls
1616## 🎮 Quickstart
1717
1818``` vue
19-
2019<script setup>
2120import { VueFlow } from '@vue-flow/core'
2221import { Controls } from '@vue-flow/controls'
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ $ npm i --save @vue-flow/minimap
1717## 🎮 Quickstart
1818
1919``` vue
20-
2120<script setup>
2221import { VueFlow } from '@vue-flow/core'
2322import { MiniMap } from '@vue-flow/minimap'
You can’t perform that action at this time.
0 commit comments