@mocanvas/editor · function

DefaultShapeWrapper

declare function DefaultShapeWrapper({ children }: TLShapeWrapperProps): react.JSX.Element

The element a shape's DOM body is rendered into.

The seam exists so an app can put an attribute, a data hook or a wrapper of its own around every shape at once — an automated-test id, a drag-and-drop target — without touching the shape utils. The default adds nothing: the positioning and pointer-event policy already live on the wrapper <Canvas> builds, and duplicating them here would give every shape a second box.

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.