Well. what about giving false to the fitView in the ReactFlow to disable automatic centering and padding: 0 to the fitViewOptions just to remove the margin or offset? fitView has the default behavior of automatic centering so making it false diables it. if you make the padding: 0, it removes any padding that makes an offset or margin from top-left corner. And so it will make react-flow_renderer start at the exact top-left(0,0) without any offset.