An infinite canvas for Svelte.

Draw, write, connect shapes with arrows, add pictures, on as many pages as you like. A plain TypeScript engine with a Svelte layer on top, and every shape and tool is a plugin.

Draw on this page

Drag me
and me

Arrows stay attached when you move a shape

Shapes and tools are plugins

This board is the library itself, running in the page. Nothing you draw here is kept.

Start

Install it, make an editor and show it on a canvas: that is a whiteboard, worked by its keys. The toolbar and the panels are yours to build, or to copy from the example.

npm install @simon-lund/svelte-draw
Getting started
<script lang="ts">
	import { Editor } from '@simon-lund/svelte-draw';
	import { Canvas, defaultPlugins } from '@simon-lund/svelte-draw/svelte';
	import '@simon-lund/svelte-draw/draw.css';

	const editor = new Editor({ plugins: defaultPlugins });
</script>

<Canvas {editor} plugins={defaultPlugins} label="Whiteboard" />

How it is built

Everything on the board is a plain record in one store, and every change is a diff. Undo, saving and sharing are listeners on that stream. A kind of shape is one class, a tool is a small state machine, and both come in as plugins. The engine has no idea Svelte exists, so it runs in a test or on a server just the same.

How it is built

Where it stands

  • Built with AI: coding agents write the code, the tests and the docs.
  • The engine and the canvas, no controls: those are your app's.
  • Tabs of one browser stay in step; syncing through a server is not built yet.
  • MIT licensed.
What is built