APIsChangelog
Log In
APIs

Get all components

webflow.getAllComponents()

Retrieves all component objects registered to the site.

Syntax

webflow.getAllComponents(): Promise<Array<Component>>

Returns

Promise<Array<Component>>

A Promise that resolves to an array of components.

Example

// Get all components
const components = await webflow.getAllComponents();

// Print Component Details
if (components.length > 0) {

  console.log("List of registered components:");

  for (let component in components) {
    const currentComponentName = await components[component].getName();
    console.log(`${component + 1}. Component Name: ${currentComponentName}, Component ID: ${components[component].id}`);
  }
} else {
  console.log("No components are currently registered.");
}

Designer Ability

Checks for authorization only

Designer AbilityPermissionLocaleBranchWorkflowSitemode
canAccessCanvasanyanyanyanyany