Skip to main content

Build interactive graphics for the web

Konva is a 2D canvas scene graph. Draw shapes, handle pointer and touch input, animate, and export — without writing canvas boilerplate.

npm install konva
  • MIT licensed
  • No dependencies
  • Maintained since 2015

Use your preferred framework: Vanilla JS

This is a live Konva stage. Drag a shape, or use its handles to resize and rotate it.

Used in production by teams at

Meta
Microsoft
Polotno
Labelbox
Zazzle

What the library gives you

Konva sits between the canvas element and your application state.

Object-oriented scene graph

Work with stages, layers, groups, and shapes instead of low-level drawing commands.

Pointer and touch input

Use the same event system for desktop pointers and touch screens.

Animations and tweens

Update shapes on each frame, or move values over time with a tween.

Node trees and events

Nest nodes, group related shapes, and use event bubbling or delegation.

Raster export

Export a stage or node to a canvas, data URL, or Blob at a selected pixel ratio.

Image filters

Cache a node and apply built-in filters such as blur, contrast, and grayscale.

Framework integrations

Use Konva with JavaScript, React, Vue, Svelte, or Angular.

Drag and transform

Make a node draggable, then add resize and rotate controls with Transformer.

Need a production design editor sooner?

A design editor needs a text engine, font loading, templates, history, and an export pipeline on top of the canvas. Polotno is a commercial SDK built with Konva that ships all of it.

Explore Polotno