Avatar

Image with an initials fallback, a presence dot, and a group that collapses into a +N counter.

Source
1 file
Dependencies
none
Playground
yes

Examples

Every variant of the shipped component, live. Switch the layout to read them as a table or one at a time, and open Code for the file behind them.

01Size
Ada LovelaceAda LovelaceAda LovelaceAda LovelaceAda Lovelace
02Fallback
GHATUIBroken Image
03Rounded
Rounded mdRounded lgRounded xlRounded full
04Status
Online userAway userBusy userOffline userOnline userGH
05Ring
No ringWith ringSquare with ringAL
06Group
Member oneMember twoMember threeGH+2
07Group shape & size
Member oneMember twoMember three+1
Member oneMember twoMember three+1

Installation

One package for the whole library — run this once and every component on this site is importable. Adding the tokens to your stylesheet is the other half; the installation guide covers it.

npm install kipui
import { Avatar, AvatarGroup } from "kipui";
Peer dependencies

react 19

react-dom 19

tailwindcss 4

Bundled dependencies

None beyond the peers above.

Usage

avatar-example.tsx
import { Avatar, AvatarGroup } from "kipui";

<AvatarGroup max={3}>
  <Avatar src="/amelia.jpg" alt="Amelia Evans" status="online" />
  <Avatar alt="Noah Mitchell" />
  <Avatar alt="Grace Foster" />
  <Avatar alt="Owen Hayes" />
</AvatarGroup>
  • `alt` is required whenever `src` is set, and doubles as the source of the fallback initials.
  • `AvatarGroup` sets `ring` on its children automatically — you don't pass it yourself.

Playground

Change the props and the snippet underneath updates with them.

Preview

<Avatar />
AE

Props

5
<Avatar
  size="lg"
  rounded="full"
  status="online"
  alt="Amelia Evans"
/>

API reference

Transcribed from the component's own types. Props with no default are required.

Avatar

PropDefaultDescription
srcstringrequiredImage source.
altstringrequiredRequired with `src`; also derives the fallback initials.
fallbackstringrequiredExplicit fallback content instead of initials.
size"xs" | "sm" | "md" | "lg" | "xl""md"Diameter and type scale.
rounded"full" | "lg" | "md""full"Corner radius.
status"online" | "offline" | "busy" | "away"requiredPresence dot.
ringbooleanfalseRing around the avatar. Set automatically inside AvatarGroup.

AvatarGroup

PropDefaultDescription
maxnumberrequiredAvatars shown before collapsing into a +N counter.
size"xs" | "sm" | "md" | "lg" | "xl""md"Applied to every child.
rounded"sm" | "md" | "lg" | "full""full"Applied to every child.