Avatar
Display user profile images, icons, or initials in a circular or square shape.
When to Use
- To represent users in lists, cards, or comments
- For user profile displays
- To show a group of users with overflow count
Import
Examples
Basic
Sizes
Shapes
Group
API
AvatarProps
src—string— Image source URLsize—"small" | "middle" | "large" | number— Avatar size (default:"middle")shape—"circle" | "square"— Avatar shape (default:"circle")icon—ReactNode— Fallback iconalt—string— Image alt textgap—number— Gap for text resizing (default:4)srcSet—string— Image srcSet attributeonError—() => boolean— Error handler, return false to fallback
Avatar.Group Props
maxCount—number— Max avatars to showmaxPopoverPlacement—"top" | "bottom"— Overflow popover positionmaxStyle—CSSProperties— Style for the overflow indicatorsize—"small" | "middle" | "large" | number— Size for all avatars