Skip to main content

AvatarGroup

The Avatar component can be used as a visual representation of multiple users.

Import

import { AvatarGroup } from '@dynatrace/strato-components-preview/content';

Use cases

The AvatarGroup is a wrapper that stacks multiple Avatars together.

CodeSandbox

Add multiple items

The AvatarGroup can display a maximum of 5 AvatarItems. If it contains more than that, the remaining items are collapsed into a menu. The trigger icon shows the number of menu items.

CodeSandbox

The AvatarGroup.Item is polymorphic, so you can, for example, polymorph it to an anchor.

CodeSandbox

Accessibility

You can navigate between AvatarGroup.Items, as well as the menu trigger, with the left and right arrow keys. A roving focus index is used, so the focus moves when you use the arrow keys. This means you can tab outside the AvatarGroup, and if you tab back inside the group, the focus is set on the item you previously navigated to.

Still have questions?
Find answers in the Dynatrace Community