Skip to main content

Components

AvatarStack

AvatarStack stacks a collection of Avatar elements

AvatarStack is under development. If you have feedback or suggestions, please report them on Github or in Slack.

Use AvatarStack when

  • A group of people or entities should be displayed together, but space is limited.
  • You need to signal that multiple people are involved, without showing everyone at full size.

Avoid AvatarStack when

  • There is only ever a single avatar to display.
  • Each person or entity must be clearly identifiable by name or role at the same time.

Examples

Customization

AvatarStack is designed to be flexible enough to cover many different needs and use cases.

Sizes

The size of avatars in an AvatarStack is controlled via avatarSize and can be specified in any valid CSS size unit for maximum flexibility.

Gap

The visible space between avatars can be customized with gap

Expandable

In some cases, it may be desirable to expand the stack on hover and focus. This functionality is off by default.

Variants

AvatarStack supports both round and square variants, but only one variant per stack.

Indicating avatars not shown

When there are more avatars than can be displayed in the stack, there are two different ways to indicate this.

Avatars in AvatarStack can have tooltips and be links, but be aware of accessibility considerations.

Guidelines

AvatarStack should be used with caution, as it can be challenging for users to identify individual avatars in a tightly packed stack. Ensure that the use of AvatarStack makes sense in the context of the user experience and does not compromise accessibility or usability.

AvatarStack does not support wrapping across multiple lines. If there are more avatars than can fit in the stack, you can use suffix or an additional Avatar with +xx to indicate the number of hidden avatars.

Text

aria-label or aria-description can be used on AvatarStack to provide context to screen readers about what the stack represents, for example "Meeting participants" or "Team members".

Edit this page on github.com (opens in a new tab)