Examples

Click → modal

Surface params in a dialog. Wire emits a node.click event for every node in the canvas. Listen for it, open a modal, and render the option panel inside.

Click any node
Webhook
Event: ticket.created
Plan answer
gpt-5.4-mini
Model: gpt-5.4-mini
Send reply
Channel: email

Click any node above to open its options dialog. Press Esc or click the backdrop to close.

tsx
import { useState } from "react";
import { WireProvider, WireCanvas, WireOptionPanel } from "@aigentive/wire-react";

function FlowWithModal({ diagram, options }) {
  const [openId, setOpenId] = useState<string>();

  return (
    <WireProvider
      defaultDiagram={diagram}
      onEvent={(event) => {
        if (event.type === "node.click") setOpenId(event.nodeId);
      }}
    >
      <WireCanvas mode="view" />
      {openId && (
        <Modal onClose={() => setOpenId(undefined)}>
          <WireOptionPanel catalog={options} nodeId={openId} />
        </Modal>
      )}
    </WireProvider>
  );
}
NextClick → sidebar