Designer API
Control the Webflow Designer
ComponentElement.getComponent()
Get the Component Definition associated to a Component Instance
1element.getComponent(): Promise<Component>
Promise<Component>
A promise that resolves to a Component Object associated with a Component Instance.
1//Get User Selected Element from the Designer2const parent = await webflow.getSelectedElement();34// Check if this selected element is a Component Instance5if(parent && !parent.configurable && parent.type === 'ComponentInstance'){6 console.log(await parent.getComponent().getName());7 }
Checks for authorization only