Displays a group of avatars arranged horizontally. It is useful to visually showcase a group of related avatars, such as, project team members or employees.
The component allows you to display the avatars in different sizes, depending on your use case.
The AvatarGroup component has two group types:
Group type: The avatars are displayed as partially overlapped on top of each other and the entire group has one click/tap area.
Individual type: The avatars are displayed side-by-side and each avatar has its own click/tap area.
When the available space is less than the width required to display all avatars, an overflow visualization appears as a button placed at the end with the same shape and size as the avatars. The visualization displays the number of avatars that have overflowed and are not currently visible.
Use the AvatarGroup if:
You want to display a group of avatars.
You want to display several avatars which have something in common.
Do not use the AvatarGroup if:
You want to display a single avatar.
You want to display a gallery for simple images.
You want to use it for other visual content than avatars.
The component provides advanced keyboard handling. When focused, the user can use the following keyboard shortcuts in order to perform a navigation: - type Individual:
You can use both properties and attributes with the same effect. The name of each attribute is listed below the name of the property, if different.
Returns an array containing the AvatarColorScheme values that correspond to the avatars in the component.
Returns an array containing the ui5-avatar instances that are currently not displayed due to lack of space.
Defines the mode of the AvatarGroup.
Available options are:
This Element provides slot(s). This means it can display its child nodes.
Unless targeting the default slot, use the slot attribute to define the destination slot for each child.
Text, along with HTML Elements with no slot attribute, goes the the default slot.
Defines the items of the component. Use the ui5-avatar component as an item.
Note: The UX guidelines recommends using avatars with "Circle" shape. Moreover, if you use avatars with "Square" shape, there will be visual inconsistency as the built-in overflow action has "Circle" shape.
Defines the overflow button of the component. Note: We recommend using the ui5-button component.
Note: If this slot is not used, the component will display the built-in overflow button.
This Web Component fires semantic events upon user interaction. You can bind to these events with the standard DOM APIs, such as addEventListener.
Fired when the component is activated either with a click/tap or by using the Enter or Space key.
type: HTMLElement description: The DOM ref of the clicked item.
type: boolean description: indicates if the overflow button is clicked
Fired when the count of visible ui5-avatar elements in the component has changed
Theme:Quartz LightQuartz DarkQuartz High Contrast BlackQuartz High Contrast WhiteBelizeHigh Contrast BlackHigh Contrast WhiteHorizon