datui
Color scheme

Data display

UsersStack

Overlapping avatars with a "+N" counter and caption.

import { UsersStack } from "datui";

Examples

Sizes and positions

Mia, Leo and 4 others
6 people going
Liked by Ava and 5 others

Accessibility

  • Avatars and the counter are aria-hidden; the caption must carry the meaning (e.g. "6 people").

API

UsersStack

Overlapping avatars with an optional "+N" counter and caption. The avatars are decorative — the caption (children) or an `aria-label` must say who is there.

PropTypeDefaultDescription
avatarsPosition"inline-start" | "block-start" | "inline-end"inline-startWhere the avatars sit relative to the caption.
classNamestring—
countnumber—Number in the "+N" counter. Defaults to the hidden photo count; hidden when 0, above 99 or at size `s`.
photosUsersStackPhoto[][]
size"s" | "m" | "l"sAvatar size: s 16px, m 24px, l 32px.
visibleCountnumber3How many avatars to draw.