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.
type CanvaElement<
T extends CanvaMedia | CanvaImageUrl | CanvaImageBlob | undefined
> = {
type: CanvaDataType.CANVA_ELEMENT;
data: T;
layout: CanvaElementLayout;
fixed: boolean;
};
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. |
Last modified 1yr ago