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

This feature is released as part of a Beta program and may change in future releases.

Syntax

1component.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

1const components = await webflow.getAllComponents();
2const component = components[0];
3
4// Update only the description
5await component.setSettings({
6 description: 'Updated hero layout with video background',
7});
8
9// Move to a different group
10await component.setSettings({ group: 'Legacy' });
11
12// Update all settings at once
13await component.setSettings({
14 name: 'Hero Section v2',
15 group: 'Sections',
16 description: 'Redesigned hero component',
17});

Designer Ability

Designer AbilityPermissionLocaleBranchWorkflowSitemode
canModifyComponentsanyanyanyCanvasDesign