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

InternalNode

The InternalNode type is Vue Flow’s enriched representation of a Node. On top of the user-facing fields it carries measured size and an internals object with the absolute position, z-index, and handle bounds. Read one with useInternalNode().

Fields

NameTypeDefault
widthNodeType["width"]
heightNodeType["height"]
idNodeType["id"]

Unique id of a node.

positionNodeType["position"]

Position of a node on the pane.

typeNodeType["type"]

Type of node defined in nodeTypes

dataNodeType["data"]

Arbitrary data passed to a node.

sourcePositionNodeType["sourcePosition"]

Only relevant for default, source, target nodeType. Controls source position.

targetPositionNodeType["targetPosition"]

Only relevant for default, source, target nodeType. Controls target position.

hiddenNodeType["hidden"]

Whether or not the node should be visible on the canvas.

selectedNodeType["selected"]
draggingNodeType["dragging"]

Whether or not the node is currently being dragged.

draggableNodeType["draggable"]

Whether or not the node is able to be dragged.

selectableNodeType["selectable"]
connectableNodeType["connectable"]
deletableNodeType["deletable"]
dragHandleNodeType["dragHandle"]

A class name that can be applied to elements inside the node that allows those elements to act as drag handles, letting the user drag the node by clicking and dragging on those elements.

initialWidthNodeType["initialWidth"]
initialHeightNodeType["initialHeight"]
parentIdNodeType["parentId"]

Parent node id, used for creating sub-flows.

zIndexNodeType["zIndex"]
extentNodeType["extent"]

Boundary a node can be moved in.

expandParentNodeType["expandParent"]

When true, the parent node will automatically expand if this node is dragged to the edge of the parent node’s bounds.

ariaLabelNodeType["ariaLabel"]
originNodeType["origin"]

Origin of the node relative to its position.

handlesNodeType["handles"]
resizingNodeType["resizing"]

Whether the node is currently being resized.

classNodeType["class"]

Additional class names applied to the node element.

styleNodeType["style"]

Additional inline styles applied to the node element.

focusableNodeType["focusable"]

Whether the node can be focused for keyboard interaction (a11y).

ariaRoleNodeType["ariaRole"]

The ARIA role attribute for the node element, used for accessibility.

domAttributesNodeType["domAttributes"]

General escape hatch for adding custom attributes to the node’s DOM element.

measured{ width?: number; height?: number; }
internals{ positionAbsolute: XYPosition; z: number; rootParentIndex?: number; userNode: NodeType; handleBounds?: NodeHandleBounds; bounds?: NodeBounds; isParent: boolean; }

Notes

  • You don’t create InternalNodes — Vue Flow derives them from your nodes. Treat the measured and internals fields as read-only.