Skip to Content
ReferenceTypes

InternalNode

Source on GitHub

The InternalNode type is identical to the base Node type but is extended with some additional properties used internally by React Flow. Some functions and callbacks that return nodes may return an InternalNode.

export type InternalNodeBase<NodeType extends NodeBase = NodeBase> = NodeType & { measured: { width?: number; height?: number; }; internals: { positionAbsolute: XYPosition; z: number; userNode: NodeType; handleBounds?: NodeHandleBounds; bounds?: NodeBounds; }; };

Fields

NameTypeDefault
idNodeType["id"]

Unique id of a node.

positionNodeType["position"]

Position of a node on the pane.

dataNodeType["data"]

Arbitrary data passed to a node.

typeNodeType["type"]

Type of node defined in nodeTypes.

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.

widthNodeType["width"]
heightNodeType["height"]
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"]
measured{ width?: number; height?: number; }
internals{ positionAbsolute: XYPosition; z: number; userNode: NodeType; handleBounds?: NodeHandleBounds; bounds?: NodeBounds; }
Last updated on