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

One component is a whole whiteboard: canvas, toolbar, styles, pages. Give it a name and it keeps the board in the browser.

Getting started
<script lang="ts">
	import { Draw } from '@klementine/draw/svelte';
</script>

<div class="h-dvh">
	<Draw persistenceKey="my-board" />
</div>

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

  • Early: built in a few days, used by one app so far, Klementine Tiles.
  • Not on npm yet. The engine stands alone; the Svelte layer needs a design system that is not public yet.
  • Independent of tldraw, whose ideas it follows; none of its code is in it.
  • MIT licensed.
What is built

Klementine Draw, MIT licensed. Source on GitHub. tldraw is a trademark of tldraw Inc.; this project is not affiliated with it.