Open-source project
SVG-Edit/svgedit avatar
SVG-Edit/svgedit

SVGEdit: a canvas package, an editor package, and a div that must have a height

Powerful SVG-Editor for your browser

7,903 stars1,763 forksJavaScriptMIT

At a glance

What is it?
SVGEdit is a browser SVG editor split into two pieces: @svgedit/svgcanvas, which does the drawing, and the editor on top of it, which does the menus. That split is the integration path, and the integration rule that bites is that the container div needs numeric width and height, because a hidden div computes to auto and the editor initialises into nothing.
Who is it for?
SVGEdit suits a team that wants an SVG editor embedded in its own web application, or that needs a browser editor with no install for a quick vector job, and that can accept a Node build step. It does not suit a desktop-only workflow or an old browser, and it does not suit you if you want a package you can drop in and forget, since the editor and the canvas ship separately and the manifest sits ahead of the last release tag.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 102 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • SVG-Edit/svgedit7,903 ★ · +57
Star history
Repository2026-09-222026-11-15
SVG-Edit/svgedit7.8k7.9k

57 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The canvas is the reusable half, and it installs on its own

SVGEdit is two components, and the README names them separately because they have different audiences.

The first is the "svgcanvas", which takes care of the underlying SVG editor and can be used to build your own editor. The second is the "editor", which takes care of the editor UI: menus, buttons and the rest of the chrome.

If you are writing an application and want the drawing behaviour without someone else's toolbar, you install the canvas alone:

bash
npm i -s '@svgedit/svgcanvas'

and import it as the default export:

js
import svgCanvas from '@svgedit/svgcanvas'

The repository points at two places to see it used: a demos folder, and a separate svg-edit-react repository if your application is React. This is also the honest answer to the question of what to compare SVGEdit against: not another editor, but the decision between the full editor and the bare canvas.

The container div needs numeric dimensions, and the README warns you twice

Embedding the editor into your own page is what version 7 changed significantly, and the instructions are short. You include the stylesheet, add a div anywhere in the DOM, and construct the editor against it:

html
<head>
   <!-- You need to include the CSS for SVGEdit somewhere in your application -->
  <link href="./svgedit.css" rel="stylesheet" media="all"></link>
</head>

<body>
  <!-- svgedit container can be positioned anywhere in the DOM
       but it must have a width and a height -->
  <div id="container" style="width:100%;height:100vh"></div>
</body>
<script type="module">
  /* You need to call the Editor and load it in the <div> */
  import Editor from './Editor.js'

The warning is stated as a rule: the div can be positioned anywhere in the DOM but it must have a numeric width and a numeric height, not `auto`, which is what happens when the div is hidden. A container inside a collapsed panel, a hidden tab, or a modal that has not opened yet computes to `auto`, and the editor initialises into a zero-sized box.

The options for the constructor are documented separately in `docs/tutorials/ConfigOptions.md`.

Hosting it locally is npm i, one workspace build, and a dev server on port 8000

The self-hosting instructions are a numbered list, and each step is a command you can run:

1. clone or copy the repository contents from github 2. run `npm i` to install dependencies 3. run `npm run build --workspace @svgedit/svgcanvas` to build the svgcanvas dependency locally 4. to test, run `npm run start` to start a local server 5. access `http://localhost:8000/src/editor/index.html` with a supported browser 6. run `npm run build` to build a bundle that you can serve from your own web server

Step three is the one that is easy to skip and impossible to skip, because the canvas is a workspace package built locally rather than pulled from a registry. The path in step five is the source tree, not the built output.

For production you use `npm run build` and serve the bundle yourself. The dev server behind `npm run start` is vite with a fixed port and `--strictPort`, so it will fail rather than silently move to 8001.

Five hosted builds exist because browsers and abandoned features differ

Thanks to Netlify, the README offers several ways to open the editor in a browser without installing anything. There are two for version 7: the master branch on GitHub, and the latest published version on npm through unpkg.

Then it recommends version 7 but concedes that older browsers, or some abandoned features, may need an older version, and links 6.1.0 and 5.1.0 hosted builds. It adds a tip that generalises: you can try any version released on npm using unpkg, with 3.2.0 as the example.

So the choice of build is a decision about your constraints rather than about which version is best. The master build is the current work, the npm build is the last published release, and the 6.x and 5.x builds exist for environments that cannot run 7.

Deployment itself goes to Netlify, with a netlify.toml in the repository root.

The README admits the project went unmaintained, and the tags show it

The contributions section is unusually candid. SVGEdit is described as the most popular open source SVG editor, started more than 15 years ago, followed by the admission that the product was not maintained for quite a long time, and the decision to give the tool a new life by refreshing many aspects.

The release dates confirm the shape of that history. The tags are v.7.3.3 from 2023-12-10, v7.2.0 from 2022-08-14 and v.7.1.2-beta.1 from 2022-01-10. Note the naming, which is inconsistent between a leading `v` with a dot and a plain `v`.

Meanwhile the manifest in the repository reads 7.4.2, and the last push to master was on 2026-08-05. So master has moved well past the last GitHub tag. If you need the newest fixes, deploy the master build yourself.

Node 20.19 or 22.12, standard for lint, vitest plus Playwright for tests

The manifest is precise about the runtime: `node` must be `^20.19.0 || >=22.12.0`. That is a narrow floor, and it is the kind of constraint that decides your CI image rather than your code.

The scripts show how the project is checked. Linting is `standard .`, and it is wired in front of the tests as `pretest`, so a formatting failure stops the suite before it starts. Tests are `vitest run --coverage` followed by `node scripts/run-e2e.mjs`, and a playwright.config.mjs sits at the root for the end to end half.

The build is three vite invocations in sequence, one each for the svgcanvas package, the react-test package and the editor itself, with a `postbuild` that copies static assets and builds extensions. Documentation is generated with jsdoc in pedantic mode from `src`.

Workspaces are `packages/svgcanvas` and `packages/react-test`, so the canvas half of the README's split is its own workspace package.

Extensions are files you list in userExtensions, not modules you import

The sample React component was used to build an SVGEdit extension, and how it is activated is worth copying. Two steps: run `npm run build` from the extension folder `src/editor/react-extensions/react-test` to create the bundle, then modify `index.html` to activate it as a `userExtensions` entry.

The configuration call looks like this:

javascript
svgEditor.setConfig({
          allowInitialUserOverride: true,
          extensions: [],
          noDefaultExtensions: false,
          userExtensions: ['./react-extensions/react-test/dist/react-test.js']
        })

Two flags control what happens around that list. `noDefaultExtensions: false` leaves the built-in extensions in place, and `allowInitialUserOverride: true` lets the user override configuration on first load.

The mechanism is path-based, so the extension is a build artefact you produce and then reference by URL, not a package your application imports. That keeps extensions independent of the editor bundle, and it also means the path has to resolve at runtime from whatever page loads the editor.

Editorial conclusion

SVGEdit suits a team that wants an SVG editor embedded in its own web application, or that needs a browser editor with no install for a quick vector job, and that can accept a Node build step. It does not suit a desktop-only workflow or an old browser, and it does not suit you if you want a package you can drop in and forget, since the editor and the canvas ship separately and the manifest sits ahead of the last release tag. Verify three things before you build on it: that your container div has a numeric width and height rather than auto, that your Node version clears `^20.19.0 || >=22.12.0`, and which build you are actually deploying, because the hosted master build and the latest npm version are two different artifacts.

Frequently asked questions

what is svg edit

SVGEdit is a fast, web-based, JavaScript-driven SVG drawing editor that runs in any modern browser, built on top of the @svgedit/svgcanvas package. It is MIT licensed, started more than 15 years ago, and the repository says it went unmaintained for a long period before being refreshed. The canvas and the editor UI are separate components, and hosted builds of several versions are available.

How can I edit a .SVG file?

With SVGEdit you open the editor in a browser rather than a desktop app. The README links a hosted build of the master branch and one of the latest published npm version through Netlify and unpkg, and to run it yourself you clone the repository, run `npm i`, build the canvas workspace, run `npm run start`, and open `http://localhost:8000/src/editor/index.html`.

Can I embed SVGEdit in my own web application?

Yes. Version 7 changed how integration works: include the stylesheet with `<link href="./svgedit.css" rel="stylesheet" media="all">`, add a div with numeric width and height, and construct the editor against it after importing `Editor` from './Editor.js'. The container div must not compute to auto, which is what happens when it is hidden. Available options are listed in docs/tutorials/ConfigOptions.md.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. Releases
  5. SVG-Edit/svgedit on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/svg-edit-svgedit.svg)](https://hysenlabs.com/projects/svg-edit-svgedit)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/svg-edit-svgedit.svg)](https://hysenlabs.com/projects/svg-edit-svgedit)

Was this useful?