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
| Name | Type | Default |
|---|---|---|
width | NodeType["width"] | |
height | NodeType["height"] | |
id | NodeType["id"]Unique id of a node. | |
position | NodeType["position"]Position of a node on the pane. | |
type | NodeType["type"]Type of node defined in nodeTypes | |
data | NodeType["data"]Arbitrary data passed to a node. | |
sourcePosition | NodeType["sourcePosition"]Only relevant for default, source, target nodeType. Controls source position. | |
targetPosition | NodeType["targetPosition"]Only relevant for default, source, target nodeType. Controls target position. | |
selected | NodeType["selected"] | |
dragging | NodeType["dragging"]Whether or not the node is currently being dragged. | |
draggable | NodeType["draggable"]Whether or not the node is able to be dragged. | |
selectable | NodeType["selectable"] | |
connectable | NodeType["connectable"] | |
deletable | NodeType["deletable"] | |
dragHandle | NodeType["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. | |
initialWidth | NodeType["initialWidth"] | |
initialHeight | NodeType["initialHeight"] | |
parentId | NodeType["parentId"]Parent node id, used for creating sub-flows. | |
zIndex | NodeType["zIndex"] | |
extent | NodeType["extent"]Boundary a node can be moved in. | |
expandParent | NodeType["expandParent"]When | |
ariaLabel | NodeType["ariaLabel"] | |
origin | NodeType["origin"]Origin of the node relative to its position. | |
handles | NodeType["handles"] | |
resizing | NodeType["resizing"]Whether the node is currently being resized. | |
class | NodeType["class"]Additional class names applied to the node element. | |
style | NodeType["style"]Additional inline styles applied to the node element. | |
focusable | NodeType["focusable"]Whether the node can be focused for keyboard interaction (a11y). | |
ariaRole | NodeType["ariaRole"]The ARIA role attribute for the node element, used for accessibility. | |
domAttributes | NodeType["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 themeasuredandinternalsfields as read-only.