Avatar
Profile image with initials fallback, status light and stacked groups.
- Online
Maya Okafor
Design engineer
- In a meeting
Daniel Reyes
Platform lead
- Away 20m
Lena Fischer
Product designer
- Seen 3h ago
Arjun Mehta
Frontend engineer
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/avatar.jsonUsage
import { Avatar } from "@/components/ui/avatar"
<Avatar src="/maya.jpg" alt="Maya Okafor" status="online" />Examples
Group
AvatarGroup overlaps its children and folds the rest into a +N chip.
Sizes and shapes
Square suits workspaces and organisations.
Ring and color
ring marks the active person. color tints the initials and the ring.
API reference
Avatar
Renders a span and accepts every native span attribute.
| Prop | Type | Default |
|---|---|---|
alt | stringThe person's name. Read by screen readers and used for the initials. Pass "" when decorative. | None |
src | stringImage URL. Fades in once loaded. | None |
fallback | ReactNodeReplaces the initials, for example with an icon. | None |
size | "sm"28, 36, 48 or 64px. | "md" |
shape | "circle"Outline shape. | "circle" |
status | "online"Status light in the bottom-right corner. | None |
ring | booleanNeon ring with a glow, set off by a thin dark gap. | false |
decorative | booleanHidden from screen readers; alt still sets the initials. Use it when the name is printed beside the avatar. | false |
color | NeonColorPalette name or hex. Falls back to --neon-accent, then cyan. | inherited |
AvatarGroup
Renders a div. Size and shape apply to every Avatar inside.
| Prop | Type | Default |
|---|---|---|
max | numberAvatars past this count collapse into a +N chip. | None |
size | "sm"Size of every avatar and the chip. | "md" |
shape | "circle"Shape of every avatar and the chip. | "circle" |
color | NeonColorColor for every avatar in the group. | inherited |
Accessibility
- Each avatar is a single image to assistive tech, named by alt, with the status appended, e.g. "Maya Okafor (online)". Next to a visible name, pass decorative so the name isn't read twice.
- The +N chip is announced as "N more".
- The status light is cut out with #05060a; change it with className if your surface is a different color.