-
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add documentation for Vue Flow slots
- Loading branch information
1 parent
53a85bf
commit 0726a98
Showing
4 changed files
with
50 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Slots | ||
|
||
Vue Flow provides several slots for customization. | ||
In addition to the node and edge slots (see the guide on [nodes](/guide/nodes.html) and [edges](/guide/edges.html)), | ||
there are a number of other slots you can use to customize the visualization. | ||
|
||
## Default | ||
|
||
The default slot can be used to nest elements inside the Vue Flow wrapper `<div>`. | ||
It will not be rendered inside the viewport, meaning it will not receive a transformation for scale or positioning. | ||
You can use the default slot to add a sidebar or floating toolbar etc. to your graph. | ||
|
||
## Connection Line | ||
|
||
The connection line slot allows you to pass down a custom connection line component, which will be used, when a connection | ||
is triggered. | ||
|
||
```vue:no-line-numbers | ||
<template> | ||
<VueFlow> | ||
<template #connection-line="connectionLineProps"> | ||
<CustomConnectionLine v-bind="connectionLineProps" /> | ||
</template> | ||
</VueFlow> | ||
</template> | ||
``` | ||
|
||
The full description of connection line props can be found [here](/typedocs/interfaces/ConnectionLineProps.html/). | ||
|
||
## Zoom Pane | ||
|
||
The zoom pane slot is placed inside the viewport transformation, so that it scales and moves with the current viewport zoom and position. | ||
|
||
```vue:no-line-numbers | ||
<template> | ||
<VueFlow> | ||
<template #zoom-pane> | ||
<div>Some element inside the zoom pane</div> | ||
</template> | ||
</VueFlow> | ||
</template> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0726a98
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vue-flow-docs – ./
vue-flow-docs-git-master-bcakmakoglu.vercel.app
vueflow.dev
vue-flow-docs.vercel.app
www.vueflow.dev
vue-flow-docs-bcakmakoglu.vercel.app
next.vueflow.dev
0726a98
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vue-flow-typedoc – ./
vue-flow-typedoc-git-master-bcakmakoglu.vercel.app
types.vueflow.dev
vue-flow-typedoc-bcakmakoglu.vercel.app
vue-flow-typedoc.vercel.app