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

useInternalNode()

Source on GitHub 

The useInternalNode composable returns the InternalNode for a given id — the enriched representation Vue Flow maintains internally, with measured size, absolute position, and handle bounds under internals. Inside a custom node the id defaults to the current node.

<script setup lang="ts"> import { useInternalNode } from '@xyflow/vue'; const internalNode = useInternalNode('node-1'); // internalNode.value?.internals.positionAbsolute </script>

Signature

Parameters:
NameTypeDefault
idMaybeRefOrGetter<string | undefined>

The id of the node to access (a value, ref, or getter; defaults to the node context id)

Returns:
ComputedRef<InternalNode<NodeType> | undefined>

Notes

  • Returns a computed ref that is undefined when the node doesn’t exist.
  • The id argument accepts a ref or getter, so the result stays reactive.
  • For the plain user-facing node, use useNode().