elementsavatar-group
AvatarGroup
Group of overlapping avatars with an optional overflow count.
Import#
Usage#
AvatarGroup renders multiple Avatar items as an overlapping group with an optional overflow count.
Use Avatar for a standalone avatar.
Slot Structure#
Examples#
Basic#
Overflow Count#
Sizes#
API Reference#
Attributes#
Slot
root0 attributesContainer of grouped avatars.
No attribute metadata for this slot.
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
| class | ClassValue | — | Class applied to the component root or trigger element. |
| classes | AvatarGroupT.Classes | undefined | — | — |
| items | AvatarGroupT.Item[] | undefined | [] | Array of avatars to render in the group. |
| max | string | number | undefined | — | Maximum number of avatars to show. |
| ref | JSX.HTMLElementTags["div"] extends { ref?: infer Ref; } ? Ref : never | undefined | — | — |
| size | "xs" | "sm" | "md" | "lg" | "xl" | undefined | — | — |
| style | JSX.CSSProperties | undefined | — | — |
| styles | AvatarGroupT.Styles | undefined | — | — |
| transition | "none" | "fast" | "normal" | "slow" | undefined | — | — |
Items#
| Prop | Type | Default | Description |
|---|---|---|---|
| alt | string | undefined | — | Accessible alt text for the avatar. |
| badge | IconT.Name | — | Icon name for the badge. |
| badgePosition | NonNullable<"top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined> | undefined | bottom-right | Position of the badge. |
| fallback | IconT.Name | — | Icon name to show as fallback. |
| onStatusChange | ((status: AvatarStatus) => void) | undefined | — | Callback when the loading status of the avatar changes. |
| src | string | undefined | — | Source URL for the avatar image. |
| text | string | undefined | — | Initial text to show if image fails or is missing. |