@mocanvas/editor · interface

CanvasProps

interface CanvasProps

This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.


Properties · 6

children?: ReactNode

Extra layers rendered above the canvas (UI, menus).

className?: string
components?: Partial<CanvasComponents>

The canvas's own slots: the indicators, the brush, the background, the grid, and the two error fallbacks. A slot given here wins over the same slot on the surrounding MocanvasUiProvider, so an app can configure the whole editor through the provider and still override one canvas on one screen.

editor: Editor
indicatorOverlayUtil?: typeof ShapeIndicatorCompositor

The overlay util that paints shape indicators onto the canvas layer.

A *class*, not an instance — one is constructed per editor. Pass ShapeIndicatorCompositor.configure({ lineWidth }) to restyle, or a subclass to control which shapes get an outline.

style?: CSSProperties

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.