Node
The base interface for defining nodes in Vue Flow.Unique node identifier
Initial node position (x, y coordinates)
Node type - can be a default type or a custom type
A node label
Additional data that is passed to your custom components
Interaction Properties
Enable or disable dragging for this node
Enable or disable selecting this node
Enable or disable connecting this node. Can be
boolean, number, 'single', or a functionEnable or disable focusing this node (accessibility)
Enable or disable deleting this node
CSS selector for element to use as drag handle. Node can only be dragged from this element
Handle Positions
Position of source handles. Can be
'left', 'top', 'right', or 'bottom'Position of target handles. Can be
'left', 'top', 'right', or 'bottom'Dimensions
Fixed width of node, applied as style. Pass a number for pixel values or a string with units (e.g.,
'10rem')Fixed height of node, applied as style. Pass a number for pixel values or a string with units (e.g.,
'10rem')Parent/Child Relationships
Will be renamed to
parentId in next major releaseDefine node extent - the area in which the node can be moved
Expands parent area to fit child node
Styling
Additional class names. Can be a string, array, object, or callback returning a string
Additional styles. Can be an object or a callback returning an object
Hide or show the node
z-index for the node
Accessibility
Aria label for the node
General escape hatch for adding custom attributes to the node’s DOM element
Deprecated Properties
Called when used as target for new connection
Called when used as source for new connection
Overwrites current node type
Contextual and custom events that are passed to your custom components
GraphNode
Internal node type that extendsNode with computed properties. This is what Vue Flow uses internally after parsing your nodes.
Absolute position in relation to parent elements plus z-index
Bounds for source and target handles
Node width and height
Whether this node has child nodes
Whether the node is currently selected
Whether the node is currently being resized
Whether the node is currently being dragged
NodeProps
Props passed to node components when rendering custom nodes.Unique node id
Node type
Whether node is selected
Can node handles be connected. You need to forward this to your handles for this prop to have any effect
Node x, y (relative) position on graph
DOM element dimensions (width, height)
Additional data of node
Whether node is currently dragging
Whether node is currently resizing
Node z-index
Handle position
Handle position
Drag handle query selector
Parent node id
CoordinateExtent
Defines a rectangular area as coordinate boundaries.Example
CoordinateExtentRange
Defines node extent with padding options.Either
'parent' to use parent node boundaries, or a CoordinateExtentValues are top, right, bottom, left (same as CSS padding)
number- same padding on all sides[padding]- same padding on all sides[paddingY, paddingX]- vertical and horizontal padding[paddingTop, paddingX, paddingBottom]- top, horizontal, bottom[paddingTop, paddingRight, paddingBottom, paddingLeft]- all four sides