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
        • Get Attributes
        • Get Resolved Attributes
        • Set Attributes
        • Set Attribute
        • Get Attribute Value
        • Get Resolved Attribute Value
        • Remove Attribute
      • Custom Attributes
      • Styles
      • Text Content
      • 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.getResolvedAttributes()
  • Syntax
  • Returns
  • Example
  • Designer Ability
ElementsElement Properties & MethodsAttributes

Get resolved attributes (Beta)

Was this page helpful?
Previous

Set attributes (Beta)

Next
Built with

element.getResolvedAttributes()

Get all attributes on an element as an array of name/value pairs, with any bindings resolved to their current string values.

This method returns the final output values for each attribute. Bindings are resolved to their actual values rather than returned as binding references. For example, an attribute value bound to a component prop returns the current value of that prop rather than a binding reference object.

To get the raw attribute entries including binding references, use element.getAttributes().

Beta

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

Syntax

1element.getResolvedAttributes(): Promise<Array<{ name: string; value: string }>>

Returns

Promise<Array<{ name: string; value: string }>>

A Promise that resolves to an array of attribute objects with all binding references resolved to their current string values.

Example

1const element = await webflow.getSelectedElement()
2
3if (element && element.attributes) {
4 const attributes = await element.getResolvedAttributes()
5 console.log(attributes)
6 // [{ name: 'data-label', value: 'primary' }]
7}

Try this example

Designer Ability

Checks for authorization only.

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny