Edge
Customizable edge components for Vue Flow canvases with animated and temporary states.
The Edge component provides two pre-styled edge types for Vue Flow canvases: Temporary for dashed temporary connections and Animated for connections with animated indicators.
Install using CLI
Install Manually
Copy and paste the following code in the same folder.
Features
- Two distinct edge types: Temporary and Animated
- Temporary edges use dashed lines with ring color
- Animated edges include a moving circle indicator
- Automatic handle position calculation
- Smart offset calculation based on handle type and position
- Uses Bezier curves for smooth, natural-looking connections
- Fully compatible with Vue Flow's edge system
- Type-safe implementation with TypeScript
Edge Types
<Temporary />
A dashed edge style for temporary or preview connections. Uses a simple Bezier path with a dashed stroke pattern.
<Animated />
A solid edge with an animated circle that moves along the path. The animation repeats indefinitely with a 2-second duration, providing visual feedback for active connections.
Props
Both <Animated /> and <Temporary /> components accept standard Vue Flow EdgeProps. The following are the most commonly used props:
idstring
sourcestring
targetstring
sourceXnumber
sourceYnumber
targetXnumber
targetYnumber
sourcePositionPosition
targetPositionPosition
styleCSSProperties
markerStartstring
markerEndstring