Placeholder Node
A custom node that can be clicked to create a new node.
Last updated on
Make sure to follow the prerequisites before installing the component.
npx shadcn@latest add https://ui.reactflow.dev/placeholder-nodeimport { memo } from "react";
import { PlaceholderNode } from "@/components/placeholder-node";
const PlaceholderNodeDemo = memo(() => {
return (
<PlaceholderNode>
import { Background, ReactFlow } from "@xyflow/react";
import PlaceholderNodeDemo from "./component-example";
const nodeTypes = {
placeholderNode: PlaceholderNodeDemo,
};
const defaultNodes = [
{
id: "1",
data: { label: "Original Node"