Core Types
Node
Node object structure and configuration
Edge
Edge object structure and configuration
GraphNode
Internal graph node with computed properties
GraphEdge
Internal graph edge with computed properties
Connection Types
Connection
Connection object for edge creation
ConnectionInProgress
Active connection state during dragging
HandleElement
Handle DOM element with metadata
HandleType
Handle type enum: ‘source’ or ‘target’
Position & Geometry
XYPosition
2D coordinate position
XYZPosition
3D coordinate position with z-index
Dimensions
Width and height dimensions
Rect
Rectangle with position and dimensions
Box
Bounding box with x, y, x2, y2 coordinates
Position
Handle position enum (Top, Right, Bottom, Left)
Viewport & Transform
ViewportTransform
Viewport transformation with x, y, and zoom
CoordinateExtent
Min and max coordinate boundaries
Padding
Padding configuration for viewport
State & Changes
NodeChange
Node change events for state updates
EdgeChange
Edge change events for state updates
FlowOptions
Configuration options for VueFlow
VueFlowStore
Complete store state and methods
Hooks & Events
CustomEvent
Custom event handler type
ElementData
Generic data structure for nodes/edges
Markers & Styling
EdgeMarkerType
Edge marker configuration (arrows, dots)
DefaultEdgeOptions
Default options for all edges
Type Usage Examples
Type Categories
Element Types
Node,Edge- Basic element structuresGraphNode,GraphEdge- Internal computed elementsElement,FlowElements- Union types
Connection Types
Connection- Connection parametersHandleType,HandleElement- Handle definitionsValidConnectionFunc- Connection validation
Position Types
XYPosition,XYZPosition- CoordinatesPosition- Handle position enumRect,Box- Geometric shapesDimensions- Size properties
Transform Types
ViewportTransform- Viewport stateCoordinateExtent- BoundariesPadding- Spacing configuration
Change Types
NodeChange- Node state changesEdgeChange- Edge state changes- Change subtypes (add, remove, select, position, dimensions)
Store Types
VueFlowStore- Complete store interfaceFlowOptions- Configuration optionsDefaultEdgeOptions- Edge defaults
Event Types
CustomEvent- Custom event handlersMouseTouchEvent- Pointer events- Various callback types
Type Guards
Vue Flow provides type guard functions for runtime type checking:Generic Type Parameters: Most types accept generic parameters for custom data and events:
Node<Data, CustomEvents>Edge<Data, CustomEvents>GraphNode<Data, CustomEvents>GraphEdge<Data, CustomEvents>
Exported Type Utilities
Vue Flow also exports utility types for advanced use cases:Elements- Array of nodes and edgesFlowElements- Array of graph nodes and edgesMaybeElement- Node, Edge, or unknownNodeLookup- Map of node IDs to nodesPaddingWithUnit- Padding with units (px, %)
For detailed information about each type, including all properties and usage examples, refer to the individual type documentation pages.