useInternalNode()
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:| Name | Type | Default |
|---|---|---|
id | MaybeRefOrGetter<string | undefined>The id of the node to access (a value, ref, or getter; defaults to the node context id) |
ComputedRef<InternalNode<NodeType> | undefined>Notes
- Returns a computed ref that is
undefinedwhen the node doesn’t exist. - The
idargument accepts a ref or getter, so the result stays reactive. - For the plain user-facing node, use
useNode().