| [ Web Proxy ] |
| Viewing: https://reactflow.dev/ui/components/devtools | [Back] [Original] |
A debugging tool that provides data on the viewport, the state of each node, and logs change events. This component is based on DevTools and Debugging under Advanced Use.
You can import the entire <DevTools /> component, or optionally, import individual
components for greater flexibility. These components include:
<ViewportLogger /> component that shows the current position and zoom level of the
viewport.<NodeInspector /> component that reveals the state of each node.<ChangeLogger /> that wraps your flows onNodesChange handler and logs each change
as it is dispatched.You can read more about the individual components at DevTools and Debugging. While we find these tools useful for making sure React Flow is working properly, you might also find them useful for debugging your applications as your flows and their interactions become more complex.
Make sure to follow the prerequisites before installing the component.
npx shadcn@latest add https://ui.reactflow.dev/devtoolspnpm dlx shadcn@latest add https://ui.reactflow.dev/devtoolsyarn dlx shadcn@latest add https://ui.reactflow.dev/devtoolsbun x shadcn@latest add https://ui.reactflow.dev/devtoolsimport { Background, ReactFlow } from "@xyflow/react";
import { DevTools } from "@/registry/components/devtools/";
const defaultNodes = [
{
id: "1a",
type: "input",
data: { label: "Node 1" },
position: { x: 250, y: 5 },
},
];
export default function App() {
return (
<div className="h-full w-full">
<ReactFlow defaultNodes={defaultNodes} fitView>
<Background />
<DevTools position="top-left" />
</ReactFlow>
</div>
);
}A project by the xyflow team
info@xyflow.com Copyright 2026 webkid GmbH. All rights reserved website design by Facu Montanaro
| Web Proxy Viewer | New URL | Original Page |