Set component settings (Beta)

component.setSettings(settings)

Updates one or more settings on a component. All fields are optional; only the fields that you provide are updated. Changes take effect immediately without requiring an explicit save. To set only the name of a component, see Set component name.

Beta

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

Syntax

component.setSettings(settings: Partial<ComponentSettings>): Promise<null>

Parameters

  • settings : Partial<ComponentSettings> — An object containing the fields to update. All fields are optional.
PropertyTypeRequiredDescription
namestringNoA new name for the component. Must be a non-empty string.
groupstringNoA group for the component. Pass an empty string to remove the group.
descriptionstringNoA description for the component. Pass an empty string to clear it.

Returns

Promise<null>

A Promise that resolves to null once the settings have been updated.

Example

const components = await webflow.getAllComponents();
const component = components[0];
// Update only the description
await component.setSettings({
description: 'Updated hero layout with video background',
});
// Move to a different group
await component.setSettings({ group: 'Legacy' });
// Update all settings at once
await component.setSettings({
name: 'Hero Section v2',
group: 'Sections',
description: 'Redesigned hero component',
});

Designer Ability

Designer AbilityPermissionLocaleBranchWorkflowSitemode
canModifyComponentsanyanyanyCanvasDesign