Avatar
Image or initials avatar in circle, square, and rounded shapes.
User Representation
Avatars support images, initials, and fallback icons. They automatically handle cross-origin image loading, geometric shapes, and interactive states.
Image Avatar
Using src prop
Initials Avatar
Fallback initials
Rounded Avatar
shape="rounded"
Square Fallback
shape="square"
Status & Badges
Indicate availability with predefined status dots or overlay customized notification badges.
Online Status
Busy Status
Notification Badge
Custom Icon Badge
Avatar Groups
Stack multiple avatars together. Ideal for team lists and shared document indicators.
Team Members
Dense Grouping
DiceBear Illustrated Avatars
Pass a `dicebear` prop to render beautiful SVG avatars from api.dicebear.com. Choose from 30+ illustration styles. The seed is deterministic — the same seed always produces the same avatar. BiibaOS design tokens (`primary`, `surface`, `bg`) resolve automatically to your live theme colors.
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | — | Resource URL of the avatar image |
alt | string | — | Accessibility text description for the avatar image |
initials | string | — | Configures the initials option — also used as the DiceBear seed fallback when dicebear.seed is omitted |
dicebear | DiceBearConfig | — | Renders an SVG illustration from api.dicebear.com. When set, takes priority over initials (but not over src). Supports style, seed, backgroundColor (accepts BiibaOS token names like "primary"), scale, rotate, flip, radius, and extra options. |
size | BiibaSize | 'sm' | Predefined size scaling preset |
shape | 'circle' | 'square' | 'rounded' | — | Visual shape corner style (circle, rounded, square) |
badge | React.ReactNode | — | Badge/indicator overlaid at the bottom-right |
status | 'online' | 'offline' | 'busy' | 'away' | — | Status dot color — shows a small circle at bottom-right |
onClick | () => void | — | Click handler — makes avatar interactive |
fallbackIcon | React.ReactNode | — | Fallback icon if no src and no initials |
bg | string | — | Background color of the avatar (ignored when dicebear is set) |
color | string | — | Text/Icon color of the avatar |
max | number | — | AvatarGroup: maximum number of avatars to show before overflow count |
spacing | number | — | AvatarGroup: gap between overlapping avatars (negative = overlap) |