Designer API
Control the Webflow Designer
webflow.getAllComponents()
Retrieves all component objects registered to the site.
1webflow.getAllComponents(): Promise<Array<Component>>
Promise<Array<Component>>
A Promise that resolves to an array of components.
1// Get all components2const components = await webflow.getAllComponents();34// Print Component Details5if (components.length > 0) {67 console.log("List of registered components:");89 for (let component in components) {10 const currentComponentName = await components[component].getName();11 console.log(`${component + 1}. Component Name: ${currentComponentName}, Component ID: ${components[component].id}`);12 }13} else {14 console.log("No components are currently registered.");15}
Try this example
Checks for authorization only