component.setName(name)
component.setName(name)
Set the name of the Component Object.
Syntax
component.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.
// Get Component
const components = await webflow.getAllComponents()
const myComponent = components[0]
// Set Component Name
await myComponent.setName("My New Component Name")
Designer Ability
Designer Ability | Locale | Branch | Workflow | Sitemode |
---|---|---|---|---|
canModifyComponents | any | any | Canvas | Design |