Skip to contents
library(reactflow)
nodes <- list(
  list(id = "1", position = list(x = 0, y = 0), data = list(label = "1"), type = "input"),
  list(id = "2", position = list(x = 50, y = 100), data = list(label = "2")),
  list(id = "3", position = list(x = 100, y = 200), data = list(label = "3"), type = "output")
)
edges <- list(
  list(id = "e1-2", source = "1", target = "2", type = "straight"),
  list(id = "e2-3", source = "2", target = "3", type = "smoothstep", label = "A", 
       animated = TRUE),
  list(id = "e1-3", source = "1", target = "3", type = "bezier")
)

reactflow(
  nodes = nodes,
  edges = edges,
  background(variant = "dots", gap = 12, size = 2)
)

[ ] Basic types [ ] colors and formatting: via direct styling, via classes [ ] HTML nodes [ ] styling selected one

Custom Nodes