For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
      • Attributes
      • Custom Attributes
      • Styles
      • Text Content
      • Display Name
        • Get display name
        • Set display name
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • element.getDisplayName()
  • Syntax
  • Returns
  • Example
  • Designer Ability
ElementsElement Properties & MethodsDisplay Name

Get display name (Beta)

Was this page helpful?
Previous

Set display name (Beta)

Next
Built with

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

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

1// Get the selected element
2const element = await webflow.getSelectedElement();
3
4if (element?.displayName) {
5
6 // Get the element's display name
7 const name = await element.getDisplayName();
8 console.log(name); // 'Hero Wrapper' or null
9}

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny