Avatars

Avatars are visual representations of users that can display profile pictures, initials, or fallback icons. They support various sizes, shapes, and status indicators for rich user interfaces.

Basic Usage

Avatars come in different sizes and shapes to suit various design needs. Choose between circular (default), rounded, or square shapes.

Avatar Sizes and Shapes

100%

Fallback Display

When an image fails to load or isn't provided, avatars can display initials or a default user icon. This ensures a consistent look even when images are unavailable.

Avatar Fallbacks

100%

Status Indicators

Add status indicators to show user presence states like online, offline, busy, or away. Status indicators automatically position themselves based on the avatar's shape.

Avatars with Status

100%

Avatar Groups

Stack multiple avatars together to represent groups or teams. Use the fallback option to show the number of additional users.

Grouped Avatars

100%

API Reference

Properties

Property Type Default Description src string - URL of the avatar image size string 'md' Size of the avatar: 'xs', 'sm', 'md', 'lg', 'xl' shape string 'circle' Shape of the avatar: 'circle', 'rounded', 'square' fallback string - Text to display when image fails to load status string - User status: 'online', 'offline', 'busy', 'away'

Size Reference

Size Dimensions Use Case xs 24px Compact lists, tight spaces sm 32px Comments, small components md 40px Default size, general use lg 48px Profile pages, headers xl 56px Large profiles, hero sections

Best Practices

  • Use appropriate sizes for different contexts
  • Provide meaningful fallback text (usually user initials)
  • Keep status indicators up to date
  • Use consistent shapes within the same context
  • Optimize avatar images for performance

Interactive Tour Example

Adding a Tour to Your UI

100%

Try it yourself:

Start Tour
Pro tip: When using avatars in a list or grid, consider preloading images to prevent layout shifts.