> 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 display name (Beta)

> Get the display name of a slot as defined on the component.

## `slot.getDisplayName()`

Get the display name of the slot.

The display name reflects any user-customized label applied in the Designer and may differ from the prop name defined in the component source.
When comparing slot names programmatically, verify that the value matches the expected label rather than the original prop name.

> **Beta**
>
> These methods are in public beta and may change with future releases.

## Syntax

```typescript
slot.getDisplayName(): Promise<string>
```

## Returns

**Promise\<`string`>**

A Promise that resolves to the slot's display name, which may reflect user customization applied in the Designer rather than the original prop name.

## Example

```typescript
// Get a component instance on the page
const elements = await webflow.getAllElements();
const componentInstance = elements.find(el => el.type === 'ComponentInstance');

if (componentInstance?.type === 'ComponentInstance') {

  // Get the slots on the instance
  const slots = await componentInstance.getSlots();

  // Print the display name of each slot
  for (const slot of slots) {
    const name = await slot.getDisplayName();
    console.log(name); // e.g. 'Content' or 'Sidebar'
  }

} else {
  console.log('No component instance found');
}
```

## Designer Ability

Checks for authorization only.

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