APIsChangelog
Log In

Remove element

element.remove()

Remove element from the canvas.

Syntax

element.remove(): Promise<null>

Returns

Promise<null>

A Promise that resolves to null when the Element is removed from the canvas.

Example

// Get Selected Element
const el = await webflow.getSelectedElement();

// Remove the selected element
await el?.remove();