Skip to content

Node and Edge Editing

Flow supports visual editing of nodes and edges. Double-click a node or an edge to open the editing panel and modify its properties.

Features

  • Node editing: Double-click a node to open the panel; edit label, description, size, background color, border color, border radius, etc.
  • Edge editing: Double-click an edge to open the panel; edit label, edge type, color, width, animation, etc.
  • Undo/Redo: Editing changes are recorded in history.

Basic Usage

Double-click any node or edge in the flowchart below. The editing panel will open on the right where you can change labels, styles, and other properties. The demo uses v-model:nodes and v-model:edges so that edits stay in sync with the parent.

Branch 1
Branch 2
Start
Process A
Process B
End
Node & Edge Editing

Node Editing Panel

After double-clicking a node, the node editing panel appears on the right with:

PropertyDescription
LabelText displayed on the node
DescriptionNode description
SizeWidth and height
Background ColorNode background color
Border ColorNode border color
Border RadiusCorner radius

Edge Editing Panel

After double-clicking an edge, the edge editing panel appears on the right with:

PropertyDescription
LabelText on the edge
Edge Typebezier, smoothstep, step, straight
Animated EdgeEnable flow animation
Stroke ColorEdge color
Stroke WidthEdge thickness
Show Label BackgroundToggle label background
Label Background ColorLabel background color

Readonly Mode

In readonly mode, double-clicking nodes or edges does not open the editing panel.

vue
<yh-flow :nodes="nodes" :edges="edges" readonly />

Notes

  1. Editing is enabled by default; no extra configuration is required.
  2. Changes are stored in history and support undo/redo.
  3. Editing is disabled when the flow is readonly.
  4. The editing panel is fixed on the right side of the page.

Released under the MIT License.