A profile picture with an automatic initials fallback, plus overlapping groups.
import { Avatar, AvatarGroup } from "@kivu-ui/react"On this page
import { Avatar, AvatarGroup } from "@kivu-ui/react";
import { Avatar } from "@kivu-ui/react";
export default function Demo() {
return (
<div className="flex flex-wrap items-center gap-3">
<Avatar name="Aline Uwase" size="sm" />
<Avatar name="Mei Tanaka" />
<Avatar name="Lucas Ferreira" size="lg" />
<Avatar name="Amara Okafor" size="xl" />
<Avatar src="/broken-image.png" name="Fallback Initials" />
</div>
);
}Use max to collapse the rest into a +N bubble.
import { Avatar, AvatarGroup } from "@kivu-ui/react";
export default function Demo() {
return (
<AvatarGroup max={4} size="lg">
<Avatar name="Aline Uwase" />
<Avatar name="Mei Tanaka" />
<Avatar name="Lucas Ferreira" />
<Avatar name="Amara Okafor" />
<Avatar name="Kofi Mensah" />
<Avatar name="Sofia Rossi" />
</AvatarGroup>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
src | string | - | Image URL. |
name | string | - | Used for the initials and alt text. |
alt | string | - | Overrides the alt text. |
size | "sm" | "md" | "lg" | "xl" | "md" | Controls the size. |
ring | boolean | false | Outline ring (applied automatically in groups). |
| Prop | Type | Default | Description |
|---|---|---|---|
max | number | - | Avatars to show before +N. |
size | "sm" | "md" | "lg" | "xl" | "md" | Controls the size. |
Every component also accepts className and forwards its ref. Root CSS class: .kivu-avatar