Skip to Content
✨ QuickCode UI keeps growing! More components, more features, and more ways to make your projects shine. Stay tuned & maybe… hire me or sponsor me 😉 
DocumentationAvatar

Avatar

Display user profile pictures with automatic fallback to initials when images fail to load.

Install Dependencies

npx
quickcode-ui add Avatar

Examples

Default Avatar

SC
JD

Props

Avatar

PropTypeDefaultDescription
size"xs" | "sm" | "md" | "lg" | "xl""md"Size of the avatar
classNamestringundefinedAdditional CSS classes
childrenReact.ReactNoderequiredAvatarImage and AvatarFallback content
showTooltipbooleanfalseWhether to show tooltip on hover
tooltipContentstringundefinedContent to display in the tooltip

AvatarImage

PropTypeDefaultDescription
srcstringrequiredImage source URL
altstringrequiredAlternative text for the image
classNamestringundefinedAdditional CSS classes

AvatarFallback

PropTypeDefaultDescription
childrenReact.ReactNoderequiredFallback content (typically initials)
classNamestringundefinedAdditional CSS classes
Last updated on