Get settings (Beta)

element.getSettings()

Get the raw values for all settings on an element.

This method returns the current value for each setting as it is stored. Statically set values are returned as-is. Values that are bound to a data source are returned as binding reference objects with a sourceType field.

To get the resolved values instead of the binding references, use element.getResolvedSettings().

Beta

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

Syntax

1element.getSettings(): Promise<ElementSettingSummaries>

Related types:

1/**
2 * Each key is a setting key (e.g., 'domId', 'tag', 'visibility').
3 * Static values are bare (string, number, boolean, etc.).
4 * Bound values include binding metadata (sourceType + source fields).
5 * Settings with no value and no default are null.
6 */
7type ElementSettingSummaries = Record<string, ResolvedValue | BindingValue | null>;

Returns

Promise<ElementSettingSummaries>

A Promise that resolves to an object mapping setting keys to their raw values. Static values are returned as-is, and bound settings are returned as binding reference objects.

Example

1const element = await webflow.getSelectedElement()
2
3if (element) {
4 const settings = await element.getSettings()
5 console.log(settings)
6
7 /*
8 {
9 tag: 'h2',
10 domId: { sourceType: 'prop', propId: 'prop_3' },
11 altText: 'A sunset photo',
12 }
13 */
14}

Designer Ability

Checks for authorization only.

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny