AvatarStack

AvatarStack displays two or more Avatars in an inline stack.

React
readyNot reviewed for a11y
Rails
readyNot reviewed for a11y

Stacked Avatars can be used to show multiple collaborators or participants when there is limited space available.

An AvatarStack displays a minimum of 2 Avatars and a maximum of 4 Avatars.

Best practices

  • Use AvatarStack when space is limited
  • Don't use AvatarStack if there is adequate space to show 4 Avatars or less.

React examples

Default

Primer logoGitHub logoAtom logoGitHub Desktop logo

Custom size

Primer logoGitHub logoAtom logoGitHub Desktop logo

Right-aligned

The default AvatarStack is left-aligned. You can right-align the component for layouts that are better suited for it.

Primer logoGitHub logoAtom logoGitHub Desktop logo

No spread on hover

By default, Avatars will spread out to reveal themselves when you hover over the stack.

Primer logoGitHub logoAtom logoGitHub Desktop logo

More code examples

See the AvatarStack Storybook stories.

Props

AvatarStack

NameRequiredDescription
children
ReactNode
A set of Avatar components to stack
alignRight
boolean
Align the avatars to the right
disableExpand
boolean
Do not spread the avatars on hover
size
number | { narrow?: number; regular?: number; wide?: number; }
The size of the avatar children in pixels.
className
string
Class name for custom styling.
sx
SystemStyleObject