Button Handle
A handle component with a button attached.
Last updated on
Make sure to follow the prerequisites before installing the component.
npx shadcn@latest add https://ui.reactflow.dev/button-handlepnpm dlx shadcn@latest add https://ui.reactflow.dev/button-handleimport { Plus } from "lucide-react";
import { ConnectionState, Position, useConnection } from "@xyflow/react";
import { ButtonHandle } from "@/components/button-handle";
import { BaseNode, BaseNodeContent } from "@/components/base-node";
import { Button } from "@/components/ui/button"
import { Background, ReactFlow } from "@xyflow/react";
import SourceHandleDemo from "./component-example";
const defaultNodes = [
{
id: "1",
position: { x: 0, y: 0 },
data: { label: "Node" },
type: "sourceHandleDemo",
},
];