Search for Components

You can now use the webflow.searchComponents(options) method (Beta) to search for Components by name or description. If you don’t provide a search parameter, the method returns all Components. If you provide a string search parameter as in the following example, the method returns Components with matching names or descriptions.

// Get all Components
const allComponents = await webflow.searchComponents();
/*
[
{
id: 'xxxx',
name: 'Hero section',
group: 'Sections',
description: 'Lorem ipsum',
instances: 3,
canEdit: true,
library: null,
},
{
id: 'yyyy',
name: 'Nav Bar',
group: 'Navigation',
description: '',
instances: 5,
canEdit: false,
library: { name: 'Core Library', id: 'lib_123' },
},
]
*/
// Search for Components by query
const heroes = await webflow.searchComponents({ q: 'Hero' });
/*
[
{
id: 'xxxx',
name: 'Hero section',
group: 'Sections',
description: 'Lorem ipsum',
instances: 3,
canEdit: true,
library: null,
},
]
*/
Beta

These methods are in public beta and may change with future releases.

For more information, see Search for Components.