{"id":13408674,"url":"https://github.com/konvajs/konva","last_synced_at":"2026-03-13T16:03:31.879Z","repository":{"id":25577580,"uuid":"29011477","full_name":"konvajs/konva","owner":"konvajs","description":"Konva.js is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.","archived":false,"fork":false,"pushed_at":"2026-03-08T21:08:43.000Z","size":22694,"stargazers_count":14192,"open_issues_count":24,"forks_count":1039,"subscribers_count":169,"default_branch":"master","last_synced_at":"2026-03-09T01:47:16.187Z","etag":null,"topics":["animation","canvas","drag-and-drop","graphics","javascript","konva","node-canvas","shape"],"latest_commit_sha":null,"homepage":"http://konvajs.org/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/konvajs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["lavrton"],"patreon":"lavrton","open_collective":"konva","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-01-09T10:14:35.000Z","updated_at":"2026-03-09T01:35:43.000Z","dependencies_parsed_at":"2023-10-04T03:07:39.173Z","dependency_job_id":"46977efa-9c18-4c18-bde7-a2c32c6b06a7","html_url":"https://github.com/konvajs/konva","commit_stats":{"total_commits":3091,"total_committers":203,"mean_commits":"15.226600985221674","dds":0.4826916855386606,"last_synced_commit":"6d34326084bba32704da676e39621e2574942cc1"},"previous_names":["lavrton/kineticjs"],"tags_count":230,"template":false,"template_full_name":null,"purl":"pkg:github/konvajs/konva","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konvajs%2Fkonva","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konvajs%2Fkonva/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konvajs%2Fkonva/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konvajs%2Fkonva/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konvajs","download_url":"https://codeload.github.com/konvajs/konva/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konvajs%2Fkonva/sbom","scorecard":{"id":567237,"data":{"date":"2025-08-11","repo":{"name":"github.com/konvajs/konva","commit":"b43ff157cef9fda7137a2e863e2e6f952c1ca2c9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 3/20 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 15 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test-browser.yml:1","Warn: no topLevel permission defined: .github/workflows/test-node.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/konvajs/konva/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-browser.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/konvajs/konva/test-browser.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-browser.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/konvajs/konva/test-browser.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-node.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/konvajs/konva/test-node.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-node.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/konvajs/konva/test-node.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test-browser.yml:24","Warn: npmCommand not pinned by hash: .github/workflows/test-node.yml:24","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T15:18:17.215Z","repository_id":25577580,"created_at":"2025-08-20T15:18:17.215Z","updated_at":"2025-08-20T15:18:17.215Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30469882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","canvas","drag-and-drop","graphics","javascript","konva","node-canvas","shape"],"created_at":"2024-07-30T20:00:54.523Z","updated_at":"2026-03-13T16:03:31.846Z","avatar_url":"https://github.com/konvajs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/lavrton","https://patreon.com/lavrton","https://opencollective.com/konva","https://opencollective.com/konva/contribute","https://opencollective.com/konva/organization/0/website","https://opencollective.com/konva/organization/1/website","https://opencollective.com/konva/organization/2/website","https://opencollective.com/konva/organization/3/website","https://opencollective.com/konva/organization/4/website","https://opencollective.com/konva/organization/5/website","https://opencollective.com/konva/organization/6/website","https://opencollective.com/konva/organization/7/website","https://opencollective.com/konva/organization/8/website","https://opencollective.com/konva/organization/9/website"],"categories":["TypeScript","JavaScript","javascript","\u003e 3k ★","前端开发框架及项目","目录","Repository","Libraries","Canvas","🎨 Design \u0026 Creative","Веб-разработка"],"sub_categories":["其他_文本生成、文本对话","Canvas/SVG","JavaScript","To draw using canvas"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://konvajs.org/img/icon.png\" alt=\"Konva logo\" height=\"60\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eKonva\u003c/h1\u003e\n\n[![Financial Contributors on Open Collective](https://opencollective.com/konva/all/badge.svg?label=financial+contributors)](https://opencollective.com/konva)\n[![npm version](https://badge.fury.io/js/konva.svg)](http://badge.fury.io/js/konva)\n[![Build Status](https://github.com/konvajs/konva/actions/workflows/test-browser.yml/badge.svg)](https://github.com/konvajs/konva/actions/workflows/test-browser.ym)\n[![Build Status](https://github.com/konvajs/konva/actions/workflows/test-node.yml/badge.svg)](https://github.com/konvajs/konva/actions/workflows/test-node.ym)[![CDNJS version](https://img.shields.io/cdnjs/v/konva.svg)](https://cdnjs.com/libraries/konva)\n\nKonva is an HTML5 Canvas JavaScript framework that enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more.\n\nYou can draw things onto the stage, add event listeners to them, move them, scale them, and rotate them independently from other shapes to support high performance animations, even if your application uses thousands of shapes. Served hot with a side of awesomeness.\n\nThis repository began as a GitHub fork of [ericdrowell/KineticJS](https://github.com/ericdrowell/KineticJS).\n\n- **Visit:** The [Home Page](http://konvajs.org/) and follow on [Twitter](https://twitter.com/lavrton)\n- **Discover:** [Tutorials](http://konvajs.org/docs/index.html), [API Documentation](http://konvajs.org/api/Konva.html)\n- **Help:** [StackOverflow](http://stackoverflow.com/questions/tagged/konvajs), [Discord Chat](https://discord.gg/8FqZwVT)\n\n# Quick Look\n\n```html\n\u003cscript src=\"https://unpkg.com/konva@10.0.0-1/konva.min.js\"\u003e\u003c/script\u003e\n\u003cdiv id=\"container\"\u003e\u003c/div\u003e\n\u003cscript\u003e\n  var stage = new Konva.Stage({\n    container: 'container',\n    width: window.innerWidth,\n    height: window.innerHeight,\n  });\n\n  // add canvas element\n  var layer = new Konva.Layer();\n  stage.add(layer);\n\n  // create shape\n  var box = new Konva.Rect({\n    x: 50,\n    y: 50,\n    width: 100,\n    height: 50,\n    fill: '#00D2FF',\n    stroke: 'black',\n    strokeWidth: 4,\n    draggable: true,\n  });\n  layer.add(box);\n\n  // add cursor styling\n  box.on('mouseover', function () {\n    document.body.style.cursor = 'pointer';\n  });\n  box.on('mouseout', function () {\n    document.body.style.cursor = 'default';\n  });\n\u003c/script\u003e\n```\n\n# Browsers support\n\nKonva works in all modern mobile and desktop browsers. A browser need to be capable to run javascript code from ES2015 spec. For older browsers you may need polyfills for missing functions.\n\nAt the current moment `Konva` doesn't work in IE11 directly. To make it work you just need to provide some polyfills such as `Array.prototype.find`, `String.prototype.trimLeft`, `String.prototype.trimRight`, `Array.from`.\n\n# Debugging\n\nThe Chrome inspector simply shows the canvas element. To see the Konva objects and their details, install the konva-dev extension at https://github.com/konvajs/konva-devtool.\n\n# Loading and installing Konva\n\nKonva supports UMD loading. So you can use all possible variants to load the framework into your project:\n\n### Load Konva via classical `\u003cscript\u003e` tag from CDN:\n\n```html\n\u003cscript src=\"https://unpkg.com/konva@10.0.0-1/konva.min.js\"\u003e\u003c/script\u003e\n```\n\n### Install with npm:\n\n```bash\nnpm install konva --save\n```\n\n```javascript\n// The modern way (e.g. an ES6-style import for webpack, parcel)\nimport Konva from 'konva';\n```\n\n#### Typescript usage\n\nAdd DOM definitions into your `tsconfig.json`:\n\n```\n{\n  \"compilerOptions\": {\n    \"lib\": [\n        \"es6\",\n        \"dom\"\n    ]\n  }\n}\n```\n\n### 3 Minimal bundle\n\n```javascript\nimport Konva from 'konva/lib/Core';\n// Now you have a Konva object with Stage, Layer, FastLayer, Group, Shape and some additional utils function.\n// Also core currently already have support for drag\u0026drop and animations.\n// BUT there are no shapes (rect, circle, etc), no filters.\n\n// but you can simply add anything you need:\nimport { Rect } from 'konva/lib/shapes/Rect';\n// importing a shape will automatically inject it into Konva object\n\nvar rect1 = new Rect();\n// or:\nvar shape = new Konva.Rect();\n\n// for filters you can use this:\nimport { Blur } from 'konva/lib/filters/Blur';\n```\n\n### 4 NodeJS env\n\nIn order to run `konva` in nodejs environment you also need to install `canvas` or `skia-canvas` package manually for rendering backend.\n\n```bash\n# node-canvas backend\nnpm install konva canvas\n# skia-canvas backend\nnpm install konva skia-canvas\n```\n\nThen you can use the same Konva API and all Konva demos will work just fine. You just don't need to use `container` attribute in your stage.\n\n```js\nimport Konva from 'konva';\nimport 'konva/canvas-backend'; // or import 'konva/skia-backend';\n\nconst stage = new Konva.Stage({\n  width: 500,\n  height: 500,\n});\n// then all regular Konva code will work\n```\n\n# Backers\n\n![https://simpleshow.com](https://avatars.githubusercontent.com/u/99720652?s=200\u0026v=4 'https://simpleshow.com')\n![https://www.notably.ai/](https://avatars.githubusercontent.com/u/80046841?s=200\u0026v=4 'https://www.notably.ai/')\n\n- [myposter GmbH](https://www.myposter.de/)\n- [queue.gg](https://queue.gg/)\n\n# Change log\n\nSee [CHANGELOG.md](https://github.com/konvajs/konva/blob/master/CHANGELOG.md).\n\n## Building the Konva Framework\n\nTo make a full build run `npm run build`. The command will compile all typescript files, combine then into one bundle and run minifier.\n\n## Testing\n\nKonva uses Mocha for testing.\n\n- If you need run test only one time run `npm run test`.\n- While developing it is easy to use `npm start`. Just run it and go to [http://localhost:1234/unit-tests.html](http://localhost:1234/unit-tests.html). The watcher will rebuild the bundle on any change.\n\nKonva is covered with hundreds of tests and well over a thousand assertions.\nKonva uses TDD (test driven development) which means that every new feature or bug fix is accompanied with at least one new test.\n\n## Generate documentation\n\nRun `npx gulp api` which will build the documentation files and place them in the `api` folder.\n\n# Pull Requests\n\nI'd be happy to review any pull requests that may better the Konva project,\nin particular if you have a bug fix, enhancement, or a new shape (see `src/shapes` for examples). Before doing so, please first make sure that all of the tests pass (`npm run test`).\n\n## Contributors\n\n### Financial Contributors\n\nBecome a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/konva/contribute)]\n\n#### Individuals\n\n\u003ca href=\"https://opencollective.com/konva\"\u003e\u003cimg src=\"https://opencollective.com/konva/individuals.svg?width=890\"\u003e\u003c/a\u003e\n\n#### Organizations\n\nSupport this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/konva/contribute)]\n\n\u003ca href=\"https://opencollective.com/konva/organization/0/website\"\u003e\u003cimg src=\"https://opencollective.com/konva/organization/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/konva/organization/1/website\"\u003e\u003cimg src=\"https://opencollective.com/konva/organization/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/konva/organization/2/website\"\u003e\u003cimg src=\"https://opencollective.com/konva/organization/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/konva/organization/3/website\"\u003e\u003cimg src=\"https://opencollective.com/konva/organization/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/konva/organization/4/website\"\u003e\u003cimg src=\"https://opencollective.com/konva/organization/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/konva/organization/5/website\"\u003e\u003cimg src=\"https://opencollective.com/konva/organization/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/konva/organization/6/website\"\u003e\u003cimg src=\"https://opencollective.com/konva/organization/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/konva/organization/7/website\"\u003e\u003cimg src=\"https://opencollective.com/konva/organization/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/konva/organization/8/website\"\u003e\u003cimg src=\"https://opencollective.com/konva/organization/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/konva/organization/9/website\"\u003e\u003cimg src=\"https://opencollective.com/konva/organization/9/avatar.svg\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonvajs%2Fkonva","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonvajs%2Fkonva","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonvajs%2Fkonva/lists"}