Get display name (Beta)

element.getDisplayName()

Get the user-facing display name of an element as shown in the Navigator panel.

Beta

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

Syntax

element.getDisplayName(): Promise<null | string>

Returns

  • Promise<String>: If the element has a custom display name, a promise that resolves to that name.
  • Promise<null>: If the element is using its default name, a promise that resolves to null.

Example

// Get the selected element
const element = await webflow.getSelectedElement();
if (element?.displayName) {
// Get the element's display name
const name = await element.getDisplayName();
console.log(name); // 'Hero Wrapper' or null
}

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny