> 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 by ID

## `webflow.getComponent(id)`

Retrieves a component by its ID.

### Syntax

```typescript
webflow.getComponent(id: ComponentId): Promise<Component>
```

### Returns

**Promise\<*Component*>**

A Promise that resolves to a component.

### Example

```typescript
const componentId = '4a669354-353a-97eb-795c-4471b406e043';
const component = await webflow.getComponent(componentId);
console.log(component.id); // '4a669354-353a-97eb-795c-4471b406e043'

const componentName = await component.getName();
console.log(componentName); // 'Component Name'
```

---

### Designer Ability

Checks for authorization only

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