Konva

An HTML5 Canvas JavaScript framework for building interactive 2D graphics, editors, and diagrams.

Library
npm
v10.7.0
14,832 stars
Custom / Unknown

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
89 /100 Excellent
Development Activity 96
Maintenance 84
Community 76
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
79 /100 Good
Architecture 85
Code Quality 82
Innovation 80
Learning Curve 68

Konva.js is an HTML5 Canvas framework that extends the native 2D canvas context with a scene-graph-based API, adding interactivity, event handling, drag-and-drop, layering, caching, and filters on top of raw canvas drawing. It began as a fork of KineticJS and has grown into one of the most widely used canvas libraries in the JavaScript ecosystem, used for design tools, diagram editors, and image manipulation UIs.

Unlike bare canvas drawing, Konva models shapes, groups, and layers as nodes with retained state, so applications can move, scale, rotate, and re-render individual objects independently — even with thousands of shapes on stage — while maintaining smooth animation performance. It runs in browsers via UMD/ESM builds and also in Node.js environments through the canvas or skia-canvas backends, and has official bindings for React (react-konva), Vue, and Svelte.

What You Get

  • A full set of built-in shapes (Rect, Circle, Arc, Path, Text, Image, Star, Sprite, Transformer, and more)
  • Node-based event handling (mouse/touch/pointer) attached directly to shapes and groups
  • Built-in drag-and-drop, animation loop, tweening, and caching APIs
  • Layer-based compositing for performance with large numbers of shapes
  • A minimal-bundle Core import path plus opt-in shape/filter imports for smaller builds
  • Node.js rendering support via canvas or skia-canvas backends

Common Use Cases

  • Building design and diagram editors (e.g. Polotno-style canvas editors)
  • Interactive image cropping, annotation, and photo-editing tools
  • Whiteboard and free-drawing applications
  • Data visualization and dashboard widgets that need custom, high-performance canvas rendering
  • Server-side canvas image generation via the Node.js backends

Under The Hood

Architecture - Konva models the canvas as a retained scene graph rooted at a Stage, which contains one or more Layer nodes, each backed by its own <canvas> element (Canvas.ts/Context.ts wrap the native 2D context). Container.ts and Node.ts implement the shared tree behavior (add/remove children, transforms, caching), while Shape.ts and the concrete shapes under src/shapes/ (Rect, Circle, Path, Text, Transformer, etc.) implement per-type _sceneFunc drawing logic. Events (Global.ts, PointerEvents.ts) are dispatched by walking the node tree for hit-testing rather than relying on native DOM events, which is what lets thousands of shapes each have independent listeners. Animation.ts and Tween.ts provide a shared requestAnimationFrame-driven update loop so multiple animations stay in sync. Tech Stack - The library is authored entirely in TypeScript (97% of the codebase) and compiled with tsc plus a Rollup bundle step (rollup.config.mjs) into UMD/ESM builds; gulpfile.mjs drives packaging and API-doc generation. It has zero runtime dependencies for browser usage, and optionally depends on canvas or skia-canvas for the Node.js rendering backends (canvas-backend.ts/skia-backend.ts). Code Quality - The test/ directory contains an extensive Mocha-based suite (browser via mocha-headless-chrome and Node via tsx), described in the README as covering the library with hundreds of tests and over a thousand assertions, and the project enforces TDD for new features and fixes. Code is organized by concern (one file per shape/filter), uses TypeScript types throughout, and Prettier formatting is enforced via fmt:check. API Design - The API favors a declarative, config-object constructor pattern (new Konva.Rect({...})) consistent across every shape, plus chainable getter/setter methods generated via a shared Factory.ts helper, which keeps the surface predictable once a developer learns the pattern; a konva/lib/Core minimal entry point plus opt-in shape/filter imports let consumers trade convenience for bundle size.

Used by 5 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
92%
AGPL 3.0

Documenso

Digital Signiture

15,224

Self-hosted, open-source DocuSign alternative with legally binding PDF signatures, multi-party workflows, and a full REST and tRPC API.

View details
93
Repo Health
79
Technical
68
Dependency
Built with
TypeScript 92%
Updated 4 days ago
TypeScript
96%
Other

Dyad

AI Assistants · AI Code Assistants · AI Development

21,616

Build AI-powered apps locally with your own keys, your own models, and zero cloud lock-in.

View details
88
Repo Health
83
Technical
69
Dependency
Built with
TypeScript 96%
Updated 5 days ago
TypeScript
39%
Apache 2.0

Label Studio

AI Development · Data Engineering

28,358

Label Studio is an open-source, multi-type data labeling platform that lets teams annotate images, text, audio, video, and time series data with a configurable XML-based UI and export annotations in formats ready for any ML framework.

View details
93
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 39%
JavaScript 27%
Python 25%
Updated 4 days ago
TypeScript
44%
Other

Magic

AI Agents · Automation · Low Code Platforms

5,043

Magic is an enterprise-grade open-source AI agent platform combining a generalist AI agent, workflow engine, IM, and collaborative office system for running an AI-powered digital workforce.

View details
70
Repo Health
79
Technical
65
Dependency
Built with
TypeScript 44%
PHP 32%
Updated 1 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers