> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/library/ui-components/avatar-group.md).

# Avatar group

The UI component **Avatar Group** allows you to easily set up a collection of [Avatars](/library/ui-components/avatar.md). A data source is iterated, and a corresponding image is displayed to the user. A number of avatars are displayed, before one final shape which contains "+X", corresponding to the number of remaining items in the data source.

{% hint style="info" %}
An example setup of the **Avatar Group** is showcased in our [Showroom](https://showroom.appfarm.app/ui-components/avatar-group)! You may view a demo, as well as access the setup in Appfarm Create. If you do not have access, you may register [here](https://showroom.appfarm.app/sign-up).
{% endhint %}

## Settings

Here are some of the properties in Appfarm Create which are custom for an **Avatar Group:**

### **Data Source**

This is the data source which the component will iterate. This data source should either hold the images themselves (i.e. the data source is a File Object Class), or the data source should have a reference to a File Object Class, or a property of data type Image URL.

### **Avatar Image**

This is the image that will be displayed in each Avatar in the group, corresponding to the appropriate object in the Data Source. The data type must be `Internet URL` or `Image URL`. *Note that the File Content URL property of File Object Classes is of data type Internet URL.*

### Tooltip

An optional piece of text can appear below the appropriate Avatar item when it is hovered over. For example, in an Avatar Group of users, the user's name can be bound to the tooltip.

### Non-persistent

This property is available once a Tooltip is chosen. If this is toggled on, the tooltip will disappear when the cursor hovers over the Tooltip. For optimal usability, it is recommended that this option remains unchecked.

### Max Count

This is the maximum number of Avatars that are displayed before the final "+X" item is displayed.

### **Variant**

This property controls the shape of the avatars in the group. The choice can be made from `Circular`, `Rounded`, `Square` or `Circle`.&#x20;

### **Spacing**

This can be set to `Small` or `Medium`. This controls the gap between each item in the group.

### Event Handlers

Event Handlers can detect a specific event occurring in Appfarm Create and can link these events to actions. Two Event Handlers are available for the **Avatar Group** component:

**On Click**: This Event Handler will run an action when one of the avatars is clicked. For instance, this could show a user dialog when a user profile picture is clicked.

**On Count Click**: This Event Handler will run an action when the "+X" shape at the end is clicked. For example, this could show a full list of users who are shown through the Avatar Group.

{% hint style="info" %}
Examples of these Event Handlers and potential use cases are available in the [Showroom](https://showroom.appfarm.app/ui-components/avatar-group).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appfarm.io/library/ui-components/avatar-group.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
