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.
| Prop | Type | Default | Description |
|---|---|---|---|
| avatarsPosition | "inline-start" | "block-start" | "inline-end" | inline-start | Where the avatars sit relative to the caption. |
| className | string | — | |
| count | number | — | Number in the "+N" counter. Defaults to the hidden photo count; hidden when 0, above 99 or at size `s`. |
| photos | UsersStackPhoto[] | [] | |
| size | "s" | "m" | "l" | s | Avatar size: s 16px, m 24px, l 32px. |
| visibleCount | number | 3 | How many avatars to draw. |