New Designer API Endpoints: Components & Variables

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<Component>>;
  • registerComponent(name: string, rootElement: AnyElement): Promise<Component>;
  • unregisterComponent(component: Component): Promise<void>;
  • enterComponent(instance: ComponentElement): Promise<void>;
  • exitComponent(): Promise<void>;
  • createInstance(component: Component): Promise<ComponentElement>;
  • getRootElement(): Promise\<null | AnyElement>;

Collections & Variables

  • getDefaultVariableCollection(): Promise\<null | VariableCollection>;

Components

  • getName(): Promise\<null | string>;
  • setName(name: string): Promise<undefined>;

Variables & Collections

Collections

  • getName(): Promise\<null | string>;
  • getVariable(id: VariableId): Promise\<null | Variable>;
  • getVariableByName(name: string): Promise\<null | Variable>;
  • getAllVariables(): Promise\<Array<Variable>>;

Variables

  • getName(): Promise\<null | string>;
  • setName(newName: string): Promise<void>;
  • set(value: Value | Variable): Promise<void>;
  • get(): Promise\<null | Value | Variable>;
  • remove(): Promise<boolean>;