Components

Avatar

feedback

User avatar component for displaying profile pictures with automatic fallback to initials or icons. Supports multiple sizes and handles image loading states gracefully.

@launch/ui

Live Preview

Basic

Simple Avatar with Image

Basic avatar displaying a user profile picture

John Doe

Multiple Avatars

Display multiple user avatars in a row

John Doe
Jane Smith
Bob Johnson

Sizes

Avatar Sizes

Available size variants from extra small to 2x large

Extra Small
Small
Medium
Large
Extra Large
2X Large

Fallbacks

Fallback with Initials

Display user initials when no image is available

JD

Auto-generated Fallback

Uses first letter of alt text when no fallback is provided

A

Default Fallback

Shows question mark when no alt or fallback is provided

?

Icon Fallback

Use an icon component as fallback

Multiple Icon Fallbacks

Different icons for different use cases

Error Handling

Invalid Image URL

Falls back to initials when image fails to load

Invalid Image

Broken Domain

Handles network errors gracefully

Broken Link

No Image Source

Using Avatar without src prop shows fallback

NS

Styling

Ring Styling

Add colored rings around avatars

Blue Ring

Ring with Offset

Add spacing between avatar and ring

Green Ring with Offset

Opacity Effect

Semi-transparent avatar for disabled states

Semi-transparent

Grayscale Filter

Apply grayscale filter for inactive users

Grayscale

Groups

Basic Avatar Group

Display multiple avatars in an overlapping stack

User 1
User 2
User 3
User 4
+2

Limited Display Count

Show only first 3 avatars with remaining count

User 1
User 2
User 3
+2

Group Sizes

Control size of all avatars in group

User 1
User 2
User 3
+1
User 1
User 2
User 3
+1

Group with Fallbacks

Avatar group using initials and icons

JD
JS
AB
+1

Real World

User Profile Card

Avatar in a user profile context

John Doe

John Doe

john.doe@example.com

Comment Thread

Avatars in a discussion context

Jane Smith
Jane Smith2 hours ago

This is a great implementation!

JD
John Doe1 hour ago

Thanks! Glad you like it.

Team Members Card

Display team with member count

Team Members

User 1
User 2
User 3
User 4
+2
6 members

Usage Guidance

✓ When to Use

Use for user profiles, comment systems, user lists, navigation menus with user info, team member displays, chat interfaces. Best for representing users or entities visually.

✗ When NOT to Use

Don't use for decorative images (use img tag), product images (use Image component), logos (use img or Logo component), or status indicators (use Badge).

Props

srcaltfallbackclassNamestylechildrenonClickonChangemaxsize

Tags

avatar
user
profile
image
identity
picture
team