| ci: cache the pnpm store between runs (#412) | 3 hours ago | |
| docs: add an index for the docs folder (#411) | 3 days ago | |
| fix: keep pointer capture through a drag (#417) | 2 hours ago | |
| fix: keep pointer capture through a drag (#417) | 2 hours ago | |
| perf: stop reallocating the bounds buffer (#414) | 20 hours ago | |
| chore: move bootstrap behind a feature flag (#415) | yesterday | |
| fix: restore focus after the modal closes (#407) | 6 days ago | |
| test: cover degenerate bounding boxes (#414) | 20 hours ago | |
| chore: ignore local coverage output (#380) | last month | |
| chore: bump the copyright year (#352) | 8 months ago | |
| docs: rewrite the install section (#418) | 30 minutes ago | |
| chore: bump vite to 6.2 (#416) | 18 hours ago | |
| build: turn on verbatimModuleSyntax (#393) | last month |
canvas-editor
A small, embeddable vector canvas. Draw shapes, group them, and serialise the
result to JSON that round-trips without loss.
Install
bashnpm install canvas-editor
Usage
tsconst {Canvas} = await import('canvas-editor');const canvas = new Canvas(document.querySelector('#root'));canvas.add({kind: 'rect', x: 0, y: 0, width: 120, height: 80});
Status
| Area | State | Notes |
|---|---|---|
| Rendering | Stable | Dirty-rect redraw, no full repaints |
| Serialising | Stable | Round-trips groups and nested shapes |
| Plugins | Beta | API may change before 1.0 |
Contributing
Read the contributing guide first. In short:
- One change per pull request, with a test that fails without it.
- Run
npm testbefore pushing. - Conventional commits — the changelog is generated from them.
Issues taggedgood first issueare a reasonable place to start.
About
A small, embeddable vector canvas. Draw shapes, group them, and serialise the result to JSON that round-trips without loss.canvas-editor.dev(opens in new tab)Releases
v2.4.0Latest
last week · 36 releases