Component Blueprints

Avatar Group

An avatar group is an element that communicates to the user that there is more than 1 person associated to an item.
Person 2 namePerson 2 name

About Avatar Group#

The Avatar Group contains two Avatar components with modifying classes. Both Avatars in the group get slds-avatar-grouped applied to them. Then, slds-avatar-grouped__primary is applied to the first Avatar and slds-avatar-grouped__secondary on the second. Avatars of the image variety are preferred within an Avatar Group.

Design Guidelines

Avatar Groups should only be used to represent people and NOT groups of salesforce objects.

Base#

Person 2 namePerson 2 name
<span class="slds-avatar-group">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <img alt="Person 2 name" src="/assets/images/avatar2.jpg" title="Person 2 name" />
  </span>

With Icon#

Icon Avatars can be put into a group. In this case, on the slds-icon_container apply the slds-avatar-grouped__icon class.

Description of icon when neededDescription of icon when needed
<span class="slds-avatar-group">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <span class="slds-icon_container slds-icon-standard-user slds-avatar-grouped__icon" title="Description of icon when needed">
      <svg class="slds-icon" aria-hidden="true">

With User Initials#

User Initials Avatars can be put into a group. In this case, on the <abbr> apply the slds-avatar-grouped__initials class.

WWWW
<span class="slds-avatar-group">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <abbr class="slds-avatar__initials slds-avatar-grouped__initials" title="Person name">WW</abbr>
  </span>

Inversed#

Inversed User Initials Avatars can also be used in a group when on a dark background. To achieve the lighter background for the Avatar, additionally apply the slds-avatar-grouped_inverse class along with the slds-avatar-grouped class.

WWWW
<span class="slds-avatar-group">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary slds-avatar-grouped_inverse">
    <abbr class="slds-avatar__initials slds-avatar__initials_inverse slds-avatar-grouped__initials" title="Person name">WW</abbr>
  </span>

With Mixed Avatar types#

Avatars of type image, icon, or initials can be used in combination with each other in a group.

Person 1 nameDescription of icon when neededDescription of icon when neededWWWWPerson 1 name
<span class="slds-avatar-group">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <img alt="Person 1 name" src="/assets/images/avatar1.jpg" title="Person 1 name" />
  </span>

Sizes#

Avatar Groups come in 4 different sizes: x-small, small, medium, and large by applying a slds-avatar-group_{size} modifier class on slds-avatar-group. If the size modifier class is not used, medium is also the default size.

With Images#

X-Small
Person 2 namePerson 2 name
<span class="slds-avatar-group slds-avatar-group_x-small">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <img alt="Person 2 name" src="/assets/images/avatar2.jpg" title="Person 2 name" />
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <img alt="Person 2 name" src="/assets/images/avatar2.jpg" title="Person 2 name" />
  </span>
</span>
Small
Person 2 namePerson 2 name
<span class="slds-avatar-group slds-avatar-group_small">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <img alt="Person 2 name" src="/assets/images/avatar2.jpg" title="Person 2 name" />
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <img alt="Person 2 name" src="/assets/images/avatar2.jpg" title="Person 2 name" />
  </span>
</span>
Medium
Person 2 namePerson 2 name
<span class="slds-avatar-group slds-avatar-group_medium">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <img alt="Person 2 name" src="/assets/images/avatar2.jpg" title="Person 2 name" />
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <img alt="Person 2 name" src="/assets/images/avatar2.jpg" title="Person 2 name" />
  </span>
</span>
Large
Person 2 namePerson 2 name
<span class="slds-avatar-group slds-avatar-group_large">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <img alt="Person 2 name" src="/assets/images/avatar2.jpg" title="Person 2 name" />
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <img alt="Person 2 name" src="/assets/images/avatar2.jpg" title="Person 2 name" />
  </span>
</span>

With Icons#

X-Small
Description of icon when neededDescription of icon when needed
<span class="slds-avatar-group slds-avatar-group_x-small">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <span class="slds-icon_container slds-icon-standard-user slds-avatar-grouped__icon" title="Description of icon when needed">
      <svg class="slds-icon" aria-hidden="true">
        <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#user"></use>
      </svg>
      <span class="slds-assistive-text">Description of icon when needed</span>
    </span>
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <span class="slds-icon_container slds-icon-standard-user slds-avatar-grouped__icon" title="Description of icon when needed">
      <svg class="slds-icon" aria-hidden="true">
        <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#user"></use>
      </svg>
      <span class="slds-assistive-text">Description of icon when needed</span>
    </span>
  </span>
</span>
Small
Description of icon when neededDescription of icon when needed
<span class="slds-avatar-group slds-avatar-group_small">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <span class="slds-icon_container slds-icon-standard-user slds-avatar-grouped__icon" title="Description of icon when needed">
      <svg class="slds-icon" aria-hidden="true">
        <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#user"></use>
      </svg>
      <span class="slds-assistive-text">Description of icon when needed</span>
    </span>
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <span class="slds-icon_container slds-icon-standard-user slds-avatar-grouped__icon" title="Description of icon when needed">
      <svg class="slds-icon" aria-hidden="true">
        <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#user"></use>
      </svg>
      <span class="slds-assistive-text">Description of icon when needed</span>
    </span>
  </span>
</span>
Medium
Description of icon when neededDescription of icon when needed
<span class="slds-avatar-group slds-avatar-group_medium">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <span class="slds-icon_container slds-icon-standard-user slds-avatar-grouped__icon" title="Description of icon when needed">
      <svg class="slds-icon" aria-hidden="true">
        <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#user"></use>
      </svg>
      <span class="slds-assistive-text">Description of icon when needed</span>
    </span>
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <span class="slds-icon_container slds-icon-standard-user slds-avatar-grouped__icon" title="Description of icon when needed">
      <svg class="slds-icon" aria-hidden="true">
        <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#user"></use>
      </svg>
      <span class="slds-assistive-text">Description of icon when needed</span>
    </span>
  </span>
</span>
Large
Description of icon when neededDescription of icon when needed
<span class="slds-avatar-group slds-avatar-group_large">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <span class="slds-icon_container slds-icon-standard-user slds-avatar-grouped__icon" title="Description of icon when needed">
      <svg class="slds-icon" aria-hidden="true">
        <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#user"></use>
      </svg>
      <span class="slds-assistive-text">Description of icon when needed</span>
    </span>
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <span class="slds-icon_container slds-icon-standard-user slds-avatar-grouped__icon" title="Description of icon when needed">
      <svg class="slds-icon" aria-hidden="true">
        <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#user"></use>
      </svg>
      <span class="slds-assistive-text">Description of icon when needed</span>
    </span>
  </span>
</span>

With User Initials#

X-Small
WWWW
<span class="slds-avatar-group slds-avatar-group_x-small">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <abbr class="slds-avatar__initials slds-avatar-grouped__initials" title="Person name">WW</abbr>
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <abbr class="slds-avatar__initials slds-avatar-grouped__initials" title="Person name">WW</abbr>
  </span>
</span>
Small
WWWW
<span class="slds-avatar-group slds-avatar-group_small">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <abbr class="slds-avatar__initials slds-avatar-grouped__initials" title="Person name">WW</abbr>
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <abbr class="slds-avatar__initials slds-avatar-grouped__initials" title="Person name">WW</abbr>
  </span>
</span>
Medium
WWWW
<span class="slds-avatar-group slds-avatar-group_medium">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <abbr class="slds-avatar__initials slds-avatar-grouped__initials" title="Person name">WW</abbr>
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <abbr class="slds-avatar__initials slds-avatar-grouped__initials" title="Person name">WW</abbr>
  </span>
</span>
Large
WWWW
<span class="slds-avatar-group slds-avatar-group_large">
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__primary">
    <abbr class="slds-avatar__initials slds-avatar-grouped__initials" title="Person name">WW</abbr>
  </span>
  <span class="slds-avatar slds-avatar-grouped slds-avatar-grouped__secondary">
    <abbr class="slds-avatar__initials slds-avatar-grouped__initials" title="Person name">WW</abbr>
  </span>
</span>

Overview of CSS Classes#

Selector.slds-avatar-group
Summary

Creates an Avatar Group

Supportdev-ready
Restrictdiv, span
VariantTrue
Selector.slds-avatar-grouped
Summary

Variant of an Avatar in an Avatar Group

Restrict.slds-avatar-group span
VariantTrue
Selector.slds-avatar-grouped_inverse
Summary

Variant of an Avatar with inverse background in an Avatar Group

Restrict.slds-avatar-grouped
ModifierTrue
Selector.slds-avatar-grouped__primary
Summary

Modifier for the primary Avatar in an Avatar Group

Restrict.slds-avatar-grouped
ModifierTrue
Selector.slds-avatar-grouped__initials
Summary

Modifier for the Avatar that contains User Initials in an Avatar Group

Restrict.slds-avatar-grouped
ModifierTrue
Selector.slds-avatar-grouped__secondary
Summary

Modifier for the secondary Avatar in an Avatar Group

Restrict.slds-avatar-grouped
ModifierTrue
Selector.slds-avatar-group_x-small
Summary

Creates an extra small Avatar Group

Restrict.slds-avatar-group
ModifierTrue
Selector.slds-avatar-group_small
Summary

Creates a small Avatar Group

Restrict.slds-avatar-group
ModifierTrue
Selector.slds-avatar-group_medium
Summary

Creates a medium Avatar Group

Restrict.slds-avatar-group
ModifierTrue
Selector.slds-avatar-group_large
Summary

Creates a large Avatar Group

Restrict.slds-avatar-group
ModifierTrue

Avatar Group Release Notes

2.8.0

Added

  • Added a new blueprint and docs for Avatar Group component that is used for communicating to users that more than one person is associated with an item.