---
url: "https://vueda.dev/v3/reference/api/js/utils/rendererSupport/functions/getSlotNamesFor.md"
title: "getSlotNamesFor"
---

# getSlotNamesFor

## Overview

Get all matching prefixed slots for a given type and fieldName.

## Signature

`getSlotNamesFor(slots, prefixType, fieldName, exclude, checkExpanded, keepEmptySuffix)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-slots">slots</span> | `object` | yes | The slots object |
| <span id="param-prefixType">prefixType</span> | `string` | yes | e.g., 'field', 'widget', 'header' |
| <span id="param-fieldName">fieldName</span> | `string` | yes | e.g., 'foo' or 'foo.bar' |
| <span id="param-exclude">exclude</span> | `string[]` | yes | List of slot names or suffixes to exclude. |
| <span id="param-checkExpanded">checkExpanded</span> | `boolean` | no | If true, expanded slots are also checked. |
| <span id="param-keepEmptySuffix">keepEmptySuffix</span> | `boolean` | no | If true, empty suffixes are kept in the result. |

### Returns

`[string, string][]`

- [outerName, innerName] slot pairs

## Source

`client/lib/utils/rendererSupport.js:35`
