Skip to Content
Vue Flow v2 is here and joins xyflow! Read more here →
ReferenceComponents

<NodeToolbar />

Source on GitHub 

The <NodeToolbar /> component renders a toolbar attached to a node — handy for per-node actions or a tooltip. It stays in place as you pan and zoom.

<!-- CustomNode.vue --> <script setup lang="ts"> import { Handle, NodeToolbar, Position, type NodeProps } from '@xyflow/vue'; defineProps<NodeProps>(); </script> <template> <NodeToolbar> <button>delete</button> <button>copy</button> <button>expand</button> </NodeToolbar> <div>{{ data.label }}</div> <Handle type="target" :position="Position.Left" /> <Handle type="source" :position="Position.Right" /> </template>

Props

The type for props of <NodeToolbar /> component is exported as NodeToolbarProps.

NameTypeDefault
nodeIdstring | string[]

By passing in an array of node id’s you can render a single tooltip for a group or collection of nodes.

isVisibleboolean

If true, node toolbar is visible even if node is not selected.

positionPosition

Position of the toolbar relative to the node.

Position.Top
offsetnumber

The space between the node and the toolbar, measured in pixels.

10
align"center" | "start" | "end"

Align the toolbar relative to the node.

"center"

Notes

  • By default the toolbar is only visible when its node is selected. When multiple nodes are selected it hides to avoid overlapping toolbars — override this with the isVisible prop.
  • Pass nodeId to render the toolbar for a specific node (or an array of ids) from outside that node’s component.