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
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
      • Create a component instance
      • Open a component canvas
      • Set the selected variant
      • Select a component
      • Exit out of a component
      • Get root element
      • Get component name
      • Get component
      • Set component name
      • Get component settings
      • Set component settings
      • Get props
      • Create a prop
      • Create multiple props
      • Get a prop
      • Get a prop by name
      • Set prop settings
      • Remove a prop
  • 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
  • component.setName(name)
  • Syntax
  • Parameters
  • Returns
  • Designer Ability
ComponentsManaging Components

Set component name

Was this page helpful?
Previous

Get component settings (Beta)

Next
Built with

component.setName(name)

Set the name of the Component Object.

To set the name along with other settings, see Set component settings.

Syntax

1component.setName(name: string): Promise<void>

Parameters

  • name : string - Then name you wish to give your component

Returns

Promise<null>

A promise that resolves to null once the name has been set.

1// Get Component
2const components = await webflow.getAllComponents()
3const myComponent = components[0]
4
5// Set Component Name
6await myComponent.setName("My New Component Name")

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canModifyComponentsanyanyCanvasDesign