> ## Documentation Index > Fetch the complete documentation index at: https://www.canva.dev/docs/apps/llms.txt > Use this file to discover all available pages before exploring further. # ElementList API reference for the ElementList type. A list of elements. ## Methods Gets the number of items in the list. **Returns** The number of items. `number` Converts the list to an array. **Returns** An array containing all items. The items are the same as in the list. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). Executes a function for each item in the list. **Parameters** The function to run for each item. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). **Parameters** The current item in the list. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). **Returns** `void` **Returns** `void` Creates a new array with items that match a specific type. **Parameters** A function that checks if an item is of type `C`. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). **Parameters** The item to test. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). **Returns** `true` if the item is of type `C`, otherwise `false`. `item is C` **Returns** An array of items that are of type `C`. readonly `C`\[] Creates a new array with items that pass a test. **Parameters** A function that tests each item. Returns `true` to keep the item. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). **Parameters** The item to test. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). **Returns** `true` if the item should be included, otherwise `false`. `boolean` **Returns** An array of items that passed the test. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). Moves an existing item to a new position right before another item. **Parameters** The existing item to move the item before. If `ref` is `undefined`, the item is moved to the end of the list. If `ref` does not exist in the list, the operation fails. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). The item to move. The operation fails if the item is not already in the list. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). **Returns** `void` Moves an existing item to a new position right after another item. **Parameters** The existing item to move the item after. If `ref` is `undefined`, the item is moved to the end of the list. If `ref` does not exist in the list, the operation fails. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). The item to move. The operation fails if the item is not already in the list. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). **Returns** `void` Removes an item from the list. **Parameters** The item to remove from the list. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). **Returns** `void` Adds a copy of an item to the list and places it right before another item. **Parameters** The existing item to place the new item before. If `ref` is `undefined`, the new item is added at the end of the list. If `ref` does not exist in the list, the operation fails. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). An element state that can be inserted into a page. A state that creates a rectangle element. The rectangle can be filled with image content, video content, or a solid color. The type of content. The only valid value is `"rect"`. The appearance of the rectangle's interior. Properties of fill}> The media fill for the path, if any. A state that creates an image fill. The type of media. The only valid value is `"image"`. A unique identifier that points to an image asset in Canva's backend. If `true`, the image is flipped horizontally. If `true`, the image is flipped vertically. A state that creates a video fill. The type of media. The only valid value is `"video"`. A unique identifier that points to a video asset in Canva's backend. If `true`, the video is flipped horizontally. If `true`, the video is flipped vertically. The color fill for the path, if any. A state that creates a solid color fill. The type of color. The only valid value is `"solid"`. The color of the fill. This must be a valid, six-digit hex code, prefixed with a `#` symbol. * Must be six characters long. * Must start with a `#`. * Must use lowercase letters. **Example** ```ts "#ff0099" ``` Represents design content that the SDK doesn't support. The only valid value is `"unsupported"`. The outline of the rectangle. Properties of stroke}> The weight (thickness) of the stroke. **Minimum**: `0` **Maximum**: `100` The color of the stroke. A state that creates a solid color fill. The type of color. The only valid value is `"solid"`. The color of the fill. This must be a valid, six-digit hex code, prefixed with a `#` symbol. * Must be six characters long. * Must start with a `#`. * Must use lowercase letters. **Example** ```ts "#ff0099" ``` Represents design content that the SDK doesn't support. The only valid value is `"unsupported"`. A width, in pixels. A height, in pixels. If `true`, the element is locked and cannot be modified. The distance from the top edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` The distance from the left edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` A rotation, in degrees. **Minimum**: `-180` **Maximum**: `180` Transparency as a percentage. **Minimum**: `0` **Maximum**: `1` A state that creates a vector shape element. The type of content. The only valid value is `"shape"`. The scale and cropping of the shape. Properties of viewBox}> The distance of the shape from the top edge of the element, in pixels. The distance of the shape from the left edge of the element, in pixels. The width of the view box, in pixels. The height of the view box, in pixels. The paths that define the structure of the shape. * Must have between 1 and 30 paths. * Total size of all paths must not exceed 2kb. * Maximum of 6 unique fill colors across all paths. For more information, see [ListState](/docs/apps/api/latest/design-types-list-state/). A width, in pixels. A height, in pixels. If `true`, the element is locked and cannot be modified. The distance from the top edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` The distance from the left edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` A rotation, in degrees. **Minimum**: `-180` **Maximum**: `180` Transparency as a percentage. **Minimum**: `0` **Maximum**: `1` A state that creates an embed element, such as a YouTube video. The type of content. The only valid value is `"embed"`. The URL of the rich media. This URL must be supported by the Iframely API. A width, in pixels. A height, in pixels. If `true`, the element is locked and cannot be modified. The distance from the top edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` The distance from the left edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` A rotation, in degrees. **Minimum**: `-180` **Maximum**: `180` Transparency as a percentage. **Minimum**: `0` **Maximum**: `1` A state that creates a text element. The type of content. The only valid value is `"text"`. The text content. Properties of text}> A list of items that can be read. For more information, see [ListState](/docs/apps/api/latest/design-types-list-state/). A width, in pixels. A height, in pixels. If `true`, the element is locked and cannot be modified. The distance from the top edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` The distance from the left edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` A rotation, in degrees. **Minimum**: `-180` **Maximum**: `180` Transparency as a percentage. **Minimum**: `0` **Maximum**: `1` **Returns** The added item, or `undefined` if the operation failed. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). Adds a copy of an item to the list and places it right after another item. **Parameters** The existing item to place the new item after. If `ref` is `undefined`, the new item is added at the start of the list. If `ref` does not exist in the list, the operation fails. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/). An element state that can be inserted into a page. A state that creates a rectangle element. The rectangle can be filled with image content, video content, or a solid color. The type of content. The only valid value is `"rect"`. The appearance of the rectangle's interior. Properties of fill}> The media fill for the path, if any. A state that creates an image fill. The type of media. The only valid value is `"image"`. A unique identifier that points to an image asset in Canva's backend. If `true`, the image is flipped horizontally. If `true`, the image is flipped vertically. A state that creates a video fill. The type of media. The only valid value is `"video"`. A unique identifier that points to a video asset in Canva's backend. If `true`, the video is flipped horizontally. If `true`, the video is flipped vertically. The color fill for the path, if any. A state that creates a solid color fill. The type of color. The only valid value is `"solid"`. The color of the fill. This must be a valid, six-digit hex code, prefixed with a `#` symbol. * Must be six characters long. * Must start with a `#`. * Must use lowercase letters. **Example** ```ts "#ff0099" ``` Represents design content that the SDK doesn't support. The only valid value is `"unsupported"`. The outline of the rectangle. Properties of stroke}> The weight (thickness) of the stroke. **Minimum**: `0` **Maximum**: `100` The color of the stroke. A state that creates a solid color fill. The type of color. The only valid value is `"solid"`. The color of the fill. This must be a valid, six-digit hex code, prefixed with a `#` symbol. * Must be six characters long. * Must start with a `#`. * Must use lowercase letters. **Example** ```ts "#ff0099" ``` Represents design content that the SDK doesn't support. The only valid value is `"unsupported"`. A width, in pixels. A height, in pixels. If `true`, the element is locked and cannot be modified. The distance from the top edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` The distance from the left edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` A rotation, in degrees. **Minimum**: `-180` **Maximum**: `180` Transparency as a percentage. **Minimum**: `0` **Maximum**: `1` A state that creates a vector shape element. The type of content. The only valid value is `"shape"`. The scale and cropping of the shape. Properties of viewBox}> The distance of the shape from the top edge of the element, in pixels. The distance of the shape from the left edge of the element, in pixels. The width of the view box, in pixels. The height of the view box, in pixels. The paths that define the structure of the shape. * Must have between 1 and 30 paths. * Total size of all paths must not exceed 2kb. * Maximum of 6 unique fill colors across all paths. For more information, see [ListState](/docs/apps/api/latest/design-types-list-state/). A width, in pixels. A height, in pixels. If `true`, the element is locked and cannot be modified. The distance from the top edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` The distance from the left edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` A rotation, in degrees. **Minimum**: `-180` **Maximum**: `180` Transparency as a percentage. **Minimum**: `0` **Maximum**: `1` A state that creates an embed element, such as a YouTube video. The type of content. The only valid value is `"embed"`. The URL of the rich media. This URL must be supported by the Iframely API. A width, in pixels. A height, in pixels. If `true`, the element is locked and cannot be modified. The distance from the top edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` The distance from the left edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` A rotation, in degrees. **Minimum**: `-180` **Maximum**: `180` Transparency as a percentage. **Minimum**: `0` **Maximum**: `1` A state that creates a text element. The type of content. The only valid value is `"text"`. The text content. Properties of text}> A list of items that can be read. For more information, see [ListState](/docs/apps/api/latest/design-types-list-state/). A width, in pixels. A height, in pixels. If `true`, the element is locked and cannot be modified. The distance from the top edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` The distance from the left edge of the container, in pixels. * The pixels are relative to their container. **Minimum**: `-32768` **Maximum**: `32767` A rotation, in degrees. **Minimum**: `-180` **Maximum**: `180` Transparency as a percentage. **Minimum**: `0` **Maximum**: `1` **Returns** The added item, or `undefined` if the operation failed. For more information, see [AbsoluteElement](/docs/apps/api/latest/design-types-absolute-element/).