• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
drewmcdonald

drewmcdonald

promptCompare

Public
Like
promptCompare
Home
Code
7
.claude
3
backend
2
docs
1
frontend
4
shared
.mcp.json
deno.json
Environment variables
2
Branches
1
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
.claude
/
skills
/
ai-elements
/
references
/
edge.md
Code
/
.claude
/
skills
/
ai-elements
/
references
/
edge.md
Search
…
Viewing readonly version of main branch: v96
View latest version
edge.md

Edge

Customizable edge components for React Flow canvases with animated and temporary states.

The Edge component provides two pre-styled edge types for React Flow canvases: Temporary for dashed temporary connections and Animated for connections with animated indicators.

Installation

npx ai-elements@latest add edge

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 React Flow's edge system
  • Type-safe implementation with TypeScript

Edge Types

Edge.Temporary

A dashed edge style for temporary or preview connections. Uses a simple Bezier path with a dashed stroke pattern.

Edge.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 edge types accept standard React Flow EdgeProps:

PropTypeDefaultDescription
idstring-Unique identifier for the edge.
sourcestring-ID of the source node.
targetstring-ID of the target node.
sourceXnumber-X coordinate of the source handle (Temporary only).
sourceYnumber-Y coordinate of the source handle (Temporary only).
targetXnumber-X coordinate of the target handle (Temporary only).
targetYnumber-Y coordinate of the target handle (Temporary only).
sourcePositionPosition-Position of the source handle (Left, Right, Top, Bottom).
targetPositionPosition-Position of the target handle (Left, Right, Top, Bottom).
markerEndstring-SVG marker ID for the edge end (Animated only).
styleReact.CSSProperties-Custom styles for the edge (Animated only).
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.