Malevich

Elements / Display/

Avatar-group

Overlapping stack of avatars with overflow indicator.

Avatar-group

Overlapping stack of avatars showing a collection of people: project members, comment participants, assignees. CSS-only.

When to use

For longer lists, show the first few + overflow indicator (+N), then link to a full list view.

Variants

Variant Class Use for
Default .avatar-group Standard overlap
Tight .avatar-group.-tight More overlap (denser)
Loose .avatar-group.-loose Less overlap (more visible)
On raised .avatar-group.-on-raised Border tone matches raised surface

Anatomy

<div class="avatar-group">
  <span class="avatar">A</span>
  <span class="avatar">B</span>
  <span class="avatar">C</span>
  <span class="avatar -overflow">+5</span>
</div>

<!-- With images -->
<div class="avatar-group -tight">
  <img class="avatar" src="alex.jpg" alt="Alex" />
  <img class="avatar" src="bo.jpg" alt="Bo" />
  <img class="avatar" src="chris.jpg" alt="Chris" />
</div>

The component uses CSS to:

Tokens used

Component-tier (defined inline)

Accessibility

The group itself is decorative — there is no list semantics. If the group represents a meaningful collection (e.g. assignees to a task), wrap it in a labeled container:

<div aria-label="Assigned to 8 people">
  <div class="avatar-group">
    <span class="avatar" aria-label="Alex">A</span>
    <span class="avatar" aria-label="Bo">B</span>
    <span class="avatar -overflow" aria-label="and 6 more">+6</span>
  </div>
</div>

The individual avatar accessibility is the consumer's choice — for an image avatar, <img alt=""> is correct; for an initials avatar, an aria-label carries the name.

Edge cases

Do

Don't