New component methods
These new functions are now available in the Designer API (Beta):
webflow.getCurrentComponent(): Get the component that is currently being editedelement.getParentComponent(): Get the component that contains a given elementcomponent.getSettings(): Get the name, group, and description of a componentcomponent.setSettings(): Update one or more settings on a component
Getting the selected component
You can now retrieve the component that is currently being edited with the new webflow.getCurrentComponent() function (Beta).
If no component is being edited, the method returns null.
For more information, see Get the selected component.
Getting an element’s parent component
You can now retrieve the component that directly contains a given element with the new element.getParentComponent() function (Beta).
If the element is not inside a component, the method returns null.
For more information, see Get the parent component.
Getting and setting component settings
The new component.getSettings() and component.setSettings() functions let you read and update a component’s name, group, and description in a single call:
For more information, see: