runway

Runway

Avatar List

A list component that displays multiple avatars in a row or column, with optional overlap and max visibility.


User 1
B
User 2

The AvatarList component groups together multiple avatars. You can show them in a row or column, stack them with overlap, and even limit how many are displayed (e.g., "+3 more").

Each item is powered by the Avatar component, so you can customize it with any of its props.



Usage

javascript

1import AvatarList from '@/components/molecules/AvatarList';
2
3<AvatarList
4    avatars={[
5        { src: "/avatar1.png", alt: "User 1" },
6        { letter: "B" },
7        { src: "/avatar2.png", alt: "User 2" }
8    ]}
9/>



Props

PropTypeDefaultDescription
avatarsarray[]Each object can contain src/alt or letter.
direction"horizontal" | "vertical""horizontal"Chooses layout direction.
overlapbooleantrueIf true, applies negative margins (like Slack or GitHub) so the avatars stack.
maxVisiblenumber5Max avatars displayed before the last is replaced with +X more.
sharedAvatarPropsobject{}Common props for every Avatar (e.g. size="sm").
classNamestring""Additional Tailwind classes (overrides defaults if needed)

Use sharedAvatarProps to set common props for all avatars.




Examples

Horizontal List with Overflow

Set maxVisible to limit how many avatars are shown. The rest will be replaced with a "+X more" indicator.

User A
B
User C
+3

Vertical Stacking

Set direction="vertical" to stack avatars in a column. You can also adjust the avatar's size with sharedAvatarProps.

A
User B
C

No Overlap & Large Avatars

Hero 1
Hero 2
X
Hero 4

Combine AvatarList with ringColor or status props if you need to highlight or indicate user presence for each avatar.