konvajs/vue-konva là dự án chuyên xử lý ảnh trên GitHub với 1.4k sao, viết chủ yếu bằng TypeScript. Vue components for the Konva 2d canvas library. Build interactive graphics, design editors, and whiteboards in Vue.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Vue Konva provides declarative Vue components for the Konva 2D canvas scene graph. Use it to build design editors, whiteboards, diagrams, annotations, and other interactive graphics.
Vue Konva is MIT licensed. Each component uses the name of its Konva node with a v- prefix.
Vue tutorial
Live demos
Konva API
Star the project
Each vue-konva component corresponds to a Konva node and uses the v- prefix. Pass Konva properties through the component config prop.
Core shapes include v-rect, v-circle, v-line, v-image, v-text, and v-path. You can also create a custom shape.
To get more info about Konva you can read Konva Overview.
Quick Start
Vue 3 is required for the current package.
1 Install via npm
npm install vue-konva konva
For Vue 2, use vue-konva@2.
2 Import and use VueKonva
import { createApp } from 'vue';
import App from './App.vue';
import VueKonva from 'vue-konva';
const app = createApp(App);
app.use(VueKonva);
app.mount('#app');
Building a full design editor? Polotno is a commercial design editor SDK built on Konva by the Konva maintainers. It ships templates, text editing, and export, so you integrate an editor instead of building one: npm install polotno. Polotno has a Vue integration guide.
By default vue-konva works in "non-strict" mode. If you changed a property manually (or by user action like drag&drop) properties of the node will be not matched with properties passed as config. vue-konva updates ONLY changed properties.
In strict mode vue-konva will update all properties of the nodes to the values that you provided in config, no matter changed they or not.
You should decide what mode is better in your actual use case.
To enable strict mode pass __useStrictMode attribute:
<v-rect :config="{}" __useStrictMode></v-rect>
Configurable prefix
By default vue-konva is using v- prefix for all components.
You can use your own prefix if default one conflicts with some other libs or your components.
import Vue from 'vue';
import VueKonva from 'vue-konva'
Vue.use(VueKonva, { prefix: 'Konva'});
// in template:
<konva-stage ref="stage" :config="stage">
Custom Konva Nodes
By passing a Record<string, new (...args: any) => Node<any>> object to customNodes in options, you can use your own konva node classes in Vue Konva.
import Vue from 'vue';
import VueKonva from 'vue-konva'
class MyRect extends Konva.Rect {
constructor() {
super()
console.log('MyRect')
}
}
Vue.use(VueKonva, {
// The keys are used as component names.
customNodes: { MyRect }
})
// in template:
<v-my-rect />
Minimal Bundle (Tree-Shaking)
By default, vue-konva imports the full konva package with all shapes included. If you want to minimize your bundle size, you can use the core build that only includes what you explicitly import.
// Use core build instead of full build
import VueKonva from 'vue-konva/core';
// Import only the shapes you need
import 'konva/lib/shapes/Rect';
import 'konva/lib/shapes/Circle';
import 'konva/lib/shapes/Text';
const app = createApp(App);
app.use(VueKonva);
app.mount('#app');
Or if you prefer individual component imports:
import { Stage, Layer, Rect, Circle } from 'vue-konva/core';
// You still need to import the Konva shapes you use
import 'konva/lib/shapes/Rect';
import 'konva/lib/shapes/Circle';
This approach only includes the Konva shapes you actually use, significantly reducing bundle size.
Note:Layer, Group, FastLayer, and Label are always available in the core build since they are part of Konva's core module. You only need to import individual shapes like Rect, Circle, Text, etc.
konvajs/vue-konva thuộc nhóm Image Tools trên TopGit, cùng 12 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về konvajs/vue-konva ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/konvajs/vue-konva là nguồn chính thức.
konvajs/vue-konva có bao nhiêu sao?
konvajs/vue-konva có 1.4k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/konvajs/vue-konva. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
konvajs/vue-konva có phải mã nguồn mở không?
Có — konvajs/vue-konva phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/konvajs/vue-konva.
konvajs/vue-konva còn đang phát triển không?
Commit gần nhất trên konvajs/vue-konva là 4 tháng trước (theo timestamp GitHub). Repo có 141 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
konvajs/vue-konva dùng license gì?
konvajs/vue-konva phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
konvajs/vue-konva là gì?
konvajs/vue-konva (konvajs/vue-konva) là dự án TypeScript trên GitHub. Theo mô tả gốc: Vue components for the Konva 2d canvas library. Build interactive graphics, design editors, and whiteboards in Vue.
konvajs/vue-konva viết bằng ngôn ngữ gì?
konvajs/vue-konva chủ yếu viết bằng TypeScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
vue-konva có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về vue-konva.