---
url: "https://vueda.dev/v3/reference/api/js/use/useSlotNameGrouper/functions/useSlotNameGrouper.md"
title: "useSlotNameGrouper"
---

# useSlotNameGrouper

## Overview

Organizes slots by prefix (e.g., "field", "widget") for a specific field name.

Helps components like FieldRenderer and FormModel collect related slots
into functional groups, e.g., all `field(myField)...` slots.

Returns:
 - grouped slots by prefix
 - unmatched remaining slots
 - a helper to check if a prefix has slots

## Signature

`useSlotNameGrouper(groupPrefixes, fieldName, slots)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-groupPrefixes">groupPrefixes</span> | `string[] \| Ref` | yes | The groupPrefixes of the slot name. |
| <span id="param-fieldName">fieldName</span> | `string \| Ref` | yes | The field name to check for. |
| <span id="param-slots">slots</span> | `object` | yes | The slot names to check for. |

### Returns

`object`

## Source

`client/lib/use/useSlotNameGrouper.js:35`
