Examples

Examples.

Each example uses the public package API. Switch between them, inspect how layout changes, and reuse the route contracts.

Ports stay explicit

Connect to a node, a side, or a named endpoint.

Named ports are useful when one service has several logical outputs. Automatic anchors are better when layout direction can change.

Read edge and route docs →
request-edge.ts
edge(
  "request",
  anchors.port("client", "out"),
  anchors.auto("api"),
  {
    route: routes.orthogonal("horizontal", 0.5, 8),
    animated: "draw"
  }
);