Docs · reference · 2,655 exports · mocanvas 4.11.2

API reference

Every name the packages export, each with the signature it actually ships and the documentation written next to it. Parsed out of the type declarations inside the published package, so it cannot fall behind a release.

Start here

Editor

The whole API: what an agent calls and what a toolbar button calls.

Mocanvas

The component a host mounts, batteries included.

ShapeUtil

Subclass it to add a shape of your own.

StateNode

Subclass it to add a tool.

Store

The reactive record store underneath the document.

createStore

A document with no browser anywhere.

By package

@mocanvas/mocanvas

The flagship: the canvas component, the built-in shapes and tools, and the default UI.

1,241 exports

Browse

@mocanvas/editor

The editor itself — the store, the records, geometry, and everything the UI is built on.

1,106 exports

Browse

@mocanvas/store

The reactive record store, its schema and its migrations.

132 exports

Browse

@mocanvas/state

Signals: atoms, computed values and reactions.

2 exports

Browse

@mocanvas/sync

Multiplayer: record diffs over a transport, plus presence.

56 exports

Browse

@mocanvas/compat

TL-prefixed aliases and a stylesheet, for a migrating tldraw app.

118 exports

Browse

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.