> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Set component name

## **`component.setName(name)`**

Set the name of the Component Object.

To set the name along with other settings, see [Set component settings](/designer/reference/set-component-settings).

### Syntax

```typescript
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.

```typescript
// 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   |