For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
      • Get selected element
      • Set selected element
      • Get element children
      • Get the parent component
      • Get all elements
      • Insert element before target element
      • Insert element after target element
      • Nest element as first child
      • Nest element as last child
      • Bulk Add Elements
      • Remove element
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • element.remove()
  • Syntax
  • Returns
  • Example
  • Designer Ability
ElementsCreating & Retrieving Elements

Remove element

Was this page helpful?
Previous

Element properties & methods

Next
Built with

element.remove()

Remove element from the canvas.

Syntax

1element.remove(): Promise<null>

Returns

Promise<null>

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

Example

1// Get Selected Element
2const el = await webflow.getSelectedElement();
3
4// Remove the selected element
5await el?.remove();

Try this example

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canDesignPrimaryMainCanvasDesign