For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo

Get component

ComponentElement.getComponent()

Get the Component Definition associated to a Component Instance

Syntax

1element.getComponent(): Promise<Component>

Returns

Promise<Component>

A promise that resolves to a Component Object associated with a Component Instance.

1//Get User Selected Element from the Designer
2const parent = await webflow.getSelectedElement();
3
4// Check if this selected element is a Component Instance
5if(parent && !parent.configurable && parent.type === 'ComponentInstance'){
6 console.log(await parent.getComponent().getName());
7 }

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasanyanyanyany
Morty Proxy This is a proxified and sanitized view of the page, visit original site.