Skip to Content
React Flow 13 is here! Read the announcement →
ExamplesNodes

Rotatable Node

This example shows how to implement a custom node that can be rotated using CSS transforms.

import { ReactFlow, Background } from '@xyflow/react'; import './index.css'; import RotatableNode from './RotatableNode'; import { nodes, edges } from './initialElements'; const nodeTypes = { rotatableNode: RotatableNode, }; function Flow() { return ( <ReactFlow nodeTypes={nodeTypes} defaultNodes={nodes} defaultEdges={edges} fitView > <Background /> </ReactFlow> ); } export default Flow;