Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Konva Devtools

A browser DevTools extension for inspecting and debugging Konva.js canvas applications. Think "React DevTools" but for Konva.

Features

Elements Tab

  • Scene graph tree β€” browse every Stage, Layer, Group, and Shape in a virtualized tree view
  • Attribute editor β€” edit any node attribute in place with color pickers and number scrubbing
  • Filter editor β€” add, remove, and tweak Konva filters (+ native CSS filters on Konva v10)
  • Select by cursor β€” click nodes on the canvas to select them in the tree
  • $konva console variable β€” the selected node is available as $konva in the browser console
  • Event listener inspector β€” see all registered event listeners and detect listening: false issues
  • Cache inspector β€” view cache dimensions/memory, enable or clear cache on any node
  • Change tracking β€” snapshot a node's attributes and watch for changes in real time
  • Enhanced search β€” search by class name, /regex/, attr:value, or #id
  • Drag-and-drop reorder β€” rearrange nodes in the tree to change z-order or reparent
  • Export / Import β€” export any stage as JSON, import JSON back into the scene
  • Copy as code β€” copy a node as a new Konva.X({...}) constructor call
  • Hit region visualization β€” overlay showing which shapes receive pointer events
  • Render heatmap β€” color-coded overlay showing which layers redraw most frequently
  • Scene statistics β€” footer bar with node counts, cache memory, and Konva version
  • Dark / light theme β€” follows system preference, toggleable

Profiler Tab

  • Record layer draws β€” measure how long each Layer.draw() takes
  • Per-layer summary β€” average, max, and total draw times with visual bars
  • Recent draws timeline β€” table of individual draw events with timestamps

Animations Tab

  • Live animation monitor β€” see all running Konva.Animation instances and their target layers
  • Live tween monitor β€” see all active Konva.Tween instances, their target nodes, and animated properties
  • Auto-cleanup β€” stale entries from destroyed stages are automatically filtered out

Tools

  • Transform gizmo β€” toggle a native Konva Transformer on the selected node for interactive resize/rotate/move
  • Screenshot tools β€” export the entire stage or just the selected node as a PNG image
  • Keyboard shortcuts β€” Arrow keys to navigate, Enter/Escape to select/deselect, Delete to remove, H to toggle visibility, L to toggle listening, Cmd/Ctrl+F to search
  • Bookmark / pin nodes β€” pin frequently inspected nodes for quick access (persisted across sessions)
  • Accessibility insights β€” flag common issues on interactive nodes: missing names, tiny hit areas, blocked listeners, low opacity, hidden state

General

  • Supports Konva v9 and v10
  • Multiple stages supported
  • Works on Chrome, Edge, and Firefox

Develop

git clone <repo-url>
pnpm install
pnpm dev              # Chrome/Edge dev mode with HMR
pnpm dev:firefox      # Firefox dev mode

Load the extension from the generated dist/ folder:

  • Chrome: chrome://extensions/ β†’ Enable Developer mode β†’ Load unpacked β†’ select dist/
  • Edge: edge://extensions/ β†’ Enable Developer mode β†’ Load unpacked β†’ select dist/
  • Firefox: about:debugging#/runtime/this-firefox β†’ Load Temporary Add-on β†’ select any file in dist/

For Firefox, right-click the Konva extension icon β†’ "Always allow on..." to enable background script + popup.

Example App

A local test application is included at examples/konva-app/:

cd examples/konva-app && pnpm install && pnpm dev

Four modes: Basic Examples, Multi Stage (with dynamic add/delete stage controls), Accessibility (a11y issue test cases), and Stress Test (~10k nodes).

Build

pnpm build            # Chrome/Edge production build
pnpm build:firefox    # Firefox production build
pnpm zip              # Build + zip for store upload

Architecture

See ARCHITECTURE.md for a detailed explanation of how the extension works, including the bridge pattern, injected modules, and how each tab (Elements, Profiler, Animations) is implemented.

Thanks

Releases

Packages

Used by

Contributors

Languages