Primitives
Avatar
Circular avatar with image support and automatic fallback to initials. Includes AvatarGroup for stacked avatars.
Installation
npm install @trinkui/reactSizes
AvatarGroup
Avatar Props
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | — | Image URL for the avatar |
altrequired | string | — | Alt text; also used to generate initials fallback |
size | "xs" | "sm" | "md" | "lg" | "xl" | "md" | Size of the avatar |
ring | boolean | false | Show a ring border around the avatar |
className | string | — | Additional CSS classes |
AvatarGroup Props
| Prop | Type | Default | Description |
|---|---|---|---|
avatarsrequired | AvatarProps[] | — | Array of avatar props to render |
max | number | 5 | Maximum number of avatars to show before displaying an overflow count |
size | "xs" | "sm" | "md" | "lg" | "xl" | "md" | Size applied to all avatars in the group |
className | string | — | Additional CSS classes |