Skip to Content

Types

Vue Flow is written in TypeScript and exports the types behind its components, composables, and utilities. Because Vue Flow models flow events as component emits and instance event hooks (rather than callback props), the event payload types below (e.g. NodeMouseEvent, ConnectEndEvent) take the place of React Flow’s on* handler types.

Align

The Align type is the alignment options for a NodeToolbar relative to its node — center, start, or end.

Read more

AriaLabelConfig

The AriaLabelConfig type is the set of accessibility labels and live-region messages Vue Flow uses, which you can override.

Read more

BackgroundVariant

The BackgroundVariant type is the set of pattern styles the Background component can render — dots or lines.

Read more

ConnectEndEvent

The ConnectEndEvent type is the payload of the connect-end event — fired when a connection interaction finishes.

Read more

Connection

The Connection type describes a new connection between two handles — the source and target nodes and their handle ids.

Read more

ConnectionLineOptions

The ConnectionLineOptions type configures the temporary line drawn while making a connection — its type, style, and markers.

Read more

ConnectionMode

The ConnectionMode enum controls whether connections are restricted to source-to-target handles (strict) or allowed between any handles (loose).

Read more

ConnectionState

The ConnectionState type describes an in-progress connection — the handles, nodes, and pointer position — or an idle state when nothing is being connected.

Read more

CoordinateExtent

The CoordinateExtent type describes a bounding box as a pair of x/y corners, used to constrain panning and node movement.

Read more

DefaultEdgeOptions

The DefaultEdgeOptions type is the set of edge properties applied to every new edge via the defaultEdgeOptions prop.

Read more

Edge

An Edge is the complete description with everything Vue Flow needs to know in order to render it.

Read more

EdgeChange

The EdgeChange type is the union of changes Vue Flow reports for edges — selection, add, remove, and replace.

Read more

EdgeChangeset

The EdgeChangeset collects the edge changes Vue Flow reports for an update and applies them to your edges array.

Read more

EdgeMarker

The EdgeMarker type describes an edge marker in detail — its type, size, color, and stroke.

Read more

EdgeMarkerType

The EdgeMarkerType type is what an edge's markerStart/markerEnd accepts — either a marker type string or a full EdgeMarker object.

Read more

EdgeMouseEvent

The EdgeMouseEvent type is the payload of edge pointer events like edge-click and edge-mouse-enter — the native event and the edge.

Read more

EdgeReconnectEndEvent

The EdgeReconnectEndEvent type is the payload of the reconnect-end event — fired when an edge reconnection interaction finishes.

Read more

EdgeTypesObject

The EdgeTypesObject type maps custom edge type names to their components, as passed to the edgeTypes prop.

Read more

FinalConnectionState

The FinalConnectionState type describes the connection at the moment an interaction ends, including whether it was valid and where it was dropped.

Read more

FitViewOptions

The FitViewOptions type configures a fitView call — padding, duration, zoom limits, and which nodes to fit.

Read more

FlowExportObject

The FlowExportObject type is the serializable snapshot of a flow returned by toObject — its nodes, edges, and viewport.

Read more

HandleConnection

The HandleConnection type describes a completed connection as seen from a handle — the source and target with their handle ids and the edge id.

Read more

InternalNode

The InternalNode type is Vue Flow's enriched representation of a node, adding measured size, absolute position, and handle bounds.

Read more

IsValidConnection

The IsValidConnection type is the signature of a function that decides whether an attempted connection is allowed.

Read more

MarkerType

The MarkerType enum is the set of built-in edge marker shapes — an open or closed arrowhead.

Read more

MouseTouchEvent

The MouseTouchEvent type is a native mouse or touch event, used where an interaction can come from either input.

Read more

NoConnection

The NoConnection type is the idle half of ConnectionState — the shape when no connection is in progress.

Read more

Node

The Node type represents everything Vue Flow needs to know about a given node. Many of these properties can be manipulated both by Vue Flow or by you, but some such as width and height should be considered read-only.

Read more

NodeChange

The NodeChange type is the union of changes Vue Flow reports for nodes — position, dimensions, selection, add, remove, and replace.

Read more

NodeChangeset

The NodeChangeset collects the node changes Vue Flow reports for an update and applies them to your nodes array.

Read more

NodeConnection

The NodeConnection type describes a connection attached to a node, returned by the useNodeConnections composable.

Read more

NodeDragEvent

The NodeDragEvent type is the payload of node drag events — the native event, the dragged node, and all nodes being dragged.

Read more

NodeMouseEvent

The NodeMouseEvent type is the payload of node pointer events like node-click and node-mouse-enter — the native event and the node.

Read more

NodeOrigin

The NodeOrigin type sets which point of a node its position refers to, from top-left [0, 0] to bottom-right [1, 1].

Read more

NodeTypesObject

The NodeTypesObject type maps custom node type names to their components, as passed to the nodeTypes prop.

Read more

OnBeforeDelete

The OnBeforeDelete type is the signature of a function that can veto or modify a deletion before it happens.

Read more

OnDelete

The OnDelete type is the payload of the delete event — the nodes and edges that were removed.

Read more

PanelPosition

The PanelPosition type is the set of corners and edges a Panel, MiniMap, or Controls can be positioned at.

Read more

Position

The Position enum describes the four sides a handle can be placed on — top, right, bottom, and left.

Read more

ProOptions

The ProOptions type configures Pro-related options, such as hiding the attribution.

Read more

Rect

The Rect type describes a rectangle by its top-left position and its width and height.

Read more

SelectionMode

The SelectionMode enum controls whether a node must be fully or only partially inside the selection box to be selected.

Read more

SnapGrid

The SnapGrid type is an x/y step pair that nodes snap to when snapToGrid is enabled.

Read more

UseNodeConnectionsParams

The UseNodeConnectionsParams type is the options object accepted by the useNodeConnections composable — the node and handle to read connections for, plus optional connect/disconnect callbacks.

Read more

Viewport

The Viewport type describes the current pan and zoom of the flow as x, y, and zoom.

Read more

XYPosition

The XYPosition type is a simple x/y coordinate pair, used throughout Vue Flow for positions.

Read more
Last updated on