added
New Designer API Endpoints: Components & Variables
11 months ago by Victoria Plummer
As part of our Components Launch on Thursday, October 5th, 2023 we are launching the following endpoints to our Designer APIs
Webflow Object
Elements
- getRootElement(): Promise<null | AnyElement>;
Components
- getAllComponents(): Promise<Array>;
- registerComponent(name: string, rootElement: AnyElement): Promise;
- unregisterComponent(component: Component): Promise;
- enterComponent(instance: ComponentElement): Promise;
- exitComponent(): Promise;
- createInstance(component: Component): Promise;
- getRootElement(): Promise<null | AnyElement>;
Collections & Variables
- getDefaultVariableCollection(): Promise<null | VariableCollection>;
Components
- getName(): Promise<null | string>;
- setName(name: string): Promise;
Variables & Collections
Collections
- getName(): Promise<null | string>;
- getVariable(id: VariableId): Promise<null | Variable>;
- getVariableByName(name: string): Promise<null | Variable>;
- getAllVariables(): Promise<Array>;
Variables
- getName(): Promise<null | string>;
- setName(newName: string): Promise;
- set(value: Value | Variable): Promise;
- get(): Promise<null | Value | Variable>;
- remove(): Promise