konva
Konva — 2D Canvas Graphics Framework
Overview
Konva is a 2D canvas library for interactive graphics: a scene graph of stage, layers, groups and shapes with hit detection, drag-and-drop, transforms, animation and export, all rendered on HTML5 Canvas. It works as plain JavaScript and, through react-konva, as declarative React components — the usual base for design editors, image annotators, flowchart builders and whiteboards.
Konva 10 (September 2025) is ESM-only and no longer loads a Node.js canvas by itself; the current release is 10.7.0. react-konva versions follow React: the major version must match, and react-konva 19.3 needs React 19.3 or newer — the unpinned install fails with ERESOLVE on React 19.2 and 18.
Instructions
Installation
npm install konva react-konva # React 19.3 (react-konva 19.3)
npm install konva react-konva@19.2 # React 19.2
npm install konva react-konva@18 # React 18
npm install use-image # hook that loads an image for <Image>
Without a bundler, load https://unpkg.com/konva@10/konva.min.js with a <script> tag; it defines the global Konva. In CommonJS, Konva 10 is require("konva").default.