Skip to content

Commit 182a6d9

Browse files
committed
docs: add info on connection mode
1 parent ea59a71 commit 182a6d9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/src/guide/handle.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,22 @@ const handleConnectable: HandleConnectableFunc = (node, connectedEdges) => {
147147
</template>
148148
```
149149

150+
## Connection Mode
150151

152+
By default, Vue Flow will use `<VueFlow :connection-mode="ConnectionMode.Loose" />` which allows you to connect edges to any handle.
153+
That means connections between a `source` and another `source` type `<Handle>` are allowed.
154+
155+
If you want to restrict connections to only be made between `source` and `target` type handles, you can set the `connection-mode` prop to `ConnectionMode.Strict`.
156+
157+
```vue
158+
<script setup>
159+
import { ConnectionMode, VueFlow } from '@vue-flow/core'
160+
</script>
161+
162+
<template>
163+
<VueFlow :connection-mode="ConnectionMode.Strict" />
164+
</template>
165+
```
151166

152167
## Dynamic Handle Positions & Adding/Removing Handles Dynamically
153168

0 commit comments

Comments
 (0)