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

# Get component name

## **`component.getName()`**

Get the name of the Component Object.

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

### Syntax

```typescript
component.getName(): Promise<string>
```

### Returns

**Promise\<`string`>**

A Promise that resolves to a `string` representing the name of a component.

```typescript
const myComponentName = "Hero-Component";
const components = await webflow.getAllComponents();

// Check if component exists
for (const c in components) {
  const currentComponentName = await components[c].getName();
  if (myComponentName === currentComponentName) {
    console.log("Found Hero Component");
  }
}
```

### Designer Ability

Checks for authorization only

| Designer Ability    | Locale | Branch | Workflow | Sitemode |
| :------------------ | :----- | :----- | :------- | :------- |
| **canAccessCanvas** | any    | any    | any      | any      |