Avatar Group
AvatarGroup displays multiple Avatar components in a compact horizontal stack of overlapping avatars, representing users, entities or objects. When space is limited, an AvatarGroupCount indicates how many members are hidden.
| Salt package | @salt-ds/lab |
|---|---|
| Available since | 1.0.0-alpha.103 |
AvatarGroup represents a group of related users, entities or objects in a compact space, using a horizontal stack of overlapping avatars.
Display kind=”entity” within a group when you need to represent multiple named non-person entities together in a compact, scannable way.
Choose how many avatars to display based on the space available and how recognizable the individual members need to be.
When members are hidden, add an AvatarGroupCount as the last child to indicate how many aren’t displayed. Set the number of hidden members with the count prop, which renders a “+N” inside the component and gives the count an accessible name.
AvatarGroup can be made interactive using the render prop. Props defined on the JSX element will be merged with props from the component.
Common interactive use cases include:
- Revealing the full list of members when an avatar group is activated.
- Opening a menu with group-related actions.