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.

For elements that support custom attributes, the returned object includes an attributes key containing an array of AttributeEntry objects. Each entry’s name and value can be a string or a BindingValue if the attribute is bound.

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 attributes: [
13 { name: 'data-label', value: 'primary' },
14 { name: 'data-index', value: '1' },
15 ],
16 }
17 */
18}

Designer Ability

Checks for authorization only.

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny