AvatarGroup
Show a compact stack of avatars with an overflow count.
Anatomy#
Usage#
Use AvatarGroup to show a small set of people in a bounded space. It truncates the visible stack at
maxVisible. Keep the full membership available elsewhere when users need every name. For a single person,
use Avatar.
Overflow count#
Each entry in items accepts the Avatar props. The group
size (default md) overrides an entry’s size. AvatarGroup renders nothing for an empty items
array, and items keep input order in the DOM.
Omit maxVisible to show every avatar. A positive maxVisible is rounded down. Set maxVisible to 0 (or any negative
value) to show only the +N count. N is the number of hidden items.
Examples#
Show pull request reviewers#
Cap the stack with maxVisible so a long reviewer list stays in one row. The overflow count is the rest of
the membership.
Collapse reviewers to a count#
A positive maxVisible shows that many faces plus +N. Set maxVisible={0} to render only the remainder count
when the row has no room for faces.
API Reference#
Attributes#
data-statusProps#
Props for the AvatarGroup component. Renders a <div> element by default.