> 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 Slots (Beta)

> Get all slots on a component instance.

## `element.getSlots()`

Get all slots on a component instance.

This method returns an array of [`SlotInstanceElement`](/designer/reference/slot-instance-element) objects, one for each slot defined on the component.
Each slot can contain component instances that you can read or modify using the slot's own methods.

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

## Syntax

```typescript
element.getSlots(): Promise<Array<SlotInstanceElement>>
```

## Returns

**Promise\<Array\<*SlotInstanceElement*>>**

A Promise that resolves to an array of `SlotInstanceElement` objects.
The array order matches the order in which the slots appear in the Designer's instance properties panel.

## 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 all slots on the instance
  const slots = await componentInstance.getSlots();

  for (const slot of slots) {
    const name = await slot.getDisplayName();
    const children = await slot.getChildren();
    console.log(`Slot "${name}" has ${children.length} children`);
  }

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

## Designer Ability

Checks for authorization only.

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