Button Edge
An edge with a button that can be used to trigger a custom action.
Last updated on
Make sure to follow the prerequisites before installing the component.
npx shadcn@latest add https://ui.reactflow.dev/button-edgeimport { EdgeProps } from "@xyflow/react";
import { memo } from "react";
import { Button } from "@/components/ui/button";
import { MousePointerClick } from "lucide-react";
import { ButtonEdge } from "@/components/button-edge";
import { Background, ReactFlow } from "@xyflow/react";
import ButtonEdgeDemo from "./component-example";
const defaultNodes = [
{
id: "1",
position: { x: 200, y: 200 },
data: { label: "Node" },
},
{
id: