CanvaElement
Represents an element as it appears in the user's design. For example, when a user selects an image and opens an editing extension, the selected image and its metadata (for example, position and rotation) is the element.

Signature

1
type CanvaElement<
2
T extends CanvaMedia | CanvaImageUrl | CanvaImageBlob | undefined
3
> = {
4
type: CanvaDataType.CANVA_ELEMENT;
5
data: T;
6
layout: CanvaElementLayout;
7
fixed: boolean;
8
};
Copied!

Properties

Name
Type
Required
Description
type
Yes
This value is always "canva_element".
data
Yes
The user's image.
layout
Yes
The layout of the element.
fixed
boolean
Yes
If true, the user's image is inside a page background, grid, or frame. This prevents the extension from changing the element's layout. The extension can only reposition the user's image within the element.
Copy link