Appearance
@vue-flow/monorepo • Docs
Interface: GraphNode<Data, CustomEvents, Type>
Extends
Node<Data,CustomEvents,Type>
Type Parameters
• Data = ElementData
• CustomEvents extends Record<string, CustomEvent> = any
• Type extends string = string
Properties
ariaLabel?
optionalariaLabel:string
Inherited from
class?
optionalclass:string|string[] |Record<string,any> |ClassFunc<GraphNode<Data,CustomEvents,string>>
Additional class names, can be a string or a callback returning a string (receives current flow element)
Inherited from
computedPosition
computedPosition:
XYZPosition
absolute position in relation to parent elements + z-index
connectable?
optionalconnectable:HandleConnectable
Disable/enable connecting node
Inherited from
data
data:
Data
Additional data that is passed to your custom components
Overrides
deletable?
optionaldeletable:boolean
Disable/enable deleting node
Inherited from
dimensions
dimensions:
Dimensions
node width, height
domAttributes?
optionaldomAttributes:Omit<HTMLAttributes,"id"|"style"|"draggable"|"className"|"aria-label"|"onClick"|"onMouseenter"|"onMousemove"|"onMouseleave"|"onContextmenu"|"onDblclick"|"onKeydown">
General escape hatch for adding custom attributes to the node's DOM element.
Inherited from
draggable?
optionaldraggable:boolean
Disable/enable dragging node
Inherited from
dragging
dragging:
boolean
dragHandle?
optionaldragHandle:string
element selector as drag handle for node (can only be dragged from the dragHandle el)
Inherited from
events
events:
Partial<NodeEventsHandler<CustomEvents>>
Deprecated
will be removed in the next major version
Overrides
expandParent?
optionalexpandParent:boolean
expands parent area to fit child node
Inherited from
extent?
optionalextent:CoordinateExtent|CoordinateExtentRange|"parent"
define node extent, i.e. area in which node can be moved
Inherited from
focusable?
optionalfocusable:boolean
Disable/enable focusing node (a11y)
Inherited from
handleBounds
handleBounds:
NodeHandleBounds
height?
optionalheight:string|number|HeightFunc
Fixed height of node, applied as style You can pass a number which will be used in pixel values (height: 300 -> height: 300px) or pass a string with units (height: 10rem -> height: 10rem)
Inherited from
hidden?
optionalhidden:boolean
Is node hidden
Inherited from
id
id:
string
Unique node id
Inherited from
isParent
isParent:
boolean
isValidSourcePos?
optionalisValidSourcePos:ValidConnectionFunc
Deprecated
will be removed in next major release called when used as source for new connection
Inherited from
isValidTargetPos?
optionalisValidTargetPos:ValidConnectionFunc
Deprecated
will be removed in next major release called when used as target for new connection
Inherited from
label?
optionallabel:string|VNode<RendererNode,RendererElement,object> |Component
Deprecated
- will be removed in next major release and replaced with
{ data: { label: string | VNode | Component } }A node label
Inherited from
parentNode?
optionalparentNode:string
todo: rename to parentId in next major release define node as a child node by setting a parent node id
Inherited from
position
position:
XYPosition
initial node position x, y
Inherited from
resizing
resizing:
boolean
selectable?
optionalselectable:boolean
Disable/enable selecting node
Inherited from
selected
selected:
boolean
sourcePosition?
optionalsourcePosition:Position
handle position
Inherited from
style?
optionalstyle:Styles|StyleFunc<GraphNode<Data,CustomEvents,string>>
Additional styles, can be an object or a callback returning an object (receives current flow element)
Inherited from
targetPosition?
optionaltargetPosition:Position
handle position
Inherited from
template?
optionaltemplate:NodeComponent
Deprecated
- will be removed in the next major release overwrites current node type
Inherited from
type
type:
Type
node type, can be a default type or a custom type
Overrides
width?
optionalwidth:string|number|WidthFunc
Fixed width of node, applied as style You can pass a number which will be used in pixel values (width: 300 -> width: 300px) or pass a string with units (width: 10rem -> width: 10rem)
Inherited from
zIndex?
optionalzIndex:number