You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/enterprise/react_flow/edges.md
+121Lines changed: 121 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,3 +94,124 @@ edges: list[Edge] = [
94
94
}
95
95
]
96
96
```
97
+
98
+
# Custom Edges
99
+
100
+
React Flow in Reflex also allows you to define custom edge types. This is useful when you want edges to carry extra functionality (like buttons, labels, or dynamic styling) beyond the default straight or bezier connectors.
101
+
102
+
```python demo exec
103
+
import reflex as rx
104
+
import reflex_enterprise as rxe
105
+
from reflex_enterprise.components.flow.types import (
Copy file name to clipboardExpand all lines: docs/enterprise/react_flow/nodes.md
+195Lines changed: 195 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,3 +83,198 @@ node_with_handles = {
83
83
"targetPosition": "left"
84
84
}
85
85
```
86
+
87
+
# Custom Nodes
88
+
89
+
Creating custom nodes is as easy as building a regular React component and passing it to the `node_types`. Since they’re standard React components, you can display any content and implement any functionality you need. Plus, you’ll have access to a range of props that allow you to extend and customize the default node behavior.
90
+
91
+
Below is an example custom node using a `color picker` component.
92
+
93
+
```python demo exec
94
+
95
+
from typing import Any
96
+
97
+
import reflex as rx
98
+
99
+
import reflex_enterprise as rxe
100
+
from reflex_enterprise.components.flow.types import Connection, Edge, Node
0 commit comments