Avatar is used to represent a user. Every Avatar image has a subtle color wash.

Keerthi
KeerthiK
Keerthi
AyeshaA
Keerthi

Props

Component props
Name
Type
Default
name
Required
string
-

The name of the user. This is used for the placeholder treatment if an image is not available.

accessibilityLabel
string
-

String that clients such as VoiceOver will read to describe the element. Will default to name prop if not provided.

outline
boolean
-

Adds a white border around Avatar so it's visible when displayed on other images.

size
"xs" | "sm" | "md" | "lg" | "xl" | "fit"
-

xs: 24px, sm: 32px, md: 48px, lg: 64px, xl: 120px. If size is fit, Avatar will fill 100% of the parent container width.

src
string
-

The URL of the user's image.

verified
boolean
-

Used to indicate if the user is verified.

Usage guidelines

When to Use
  • To reflect a person, company or brand within the product.
When Not to Use
  • To represent a group of people, companies and/or brands. Use AvatarGroup instead.

Best Practices

KeerthiK
Do

Use the default alternative if no image source is available. This will be the first character of the provided name.

😀😀
Don't

Use alternative graphics or icons

Keerthi
Keerthi
Keerthi
Keerthi
Keerthi
Do

Use round Avatars in the appropriate size for your need. Learn more about avatar sizing.

Don't

Scale or change the shape of Avatar. Instead use the designated Avatar sizes and style.

Keerthi
Keerthi Singh
Do

Use Avatar to represent a person, organization or group (Avatar Group).

Artwork
Explore Typographic Art
Don't

Use Avatar to represent metaphorical ideas, like a Board. Instead, consider an icon or the appropriate interactive component.

Shanice Byles
Shanice Byles
Do

Use the collaborator’s name nearby or in an alternative view if possible.

Artwork
Explore Typographic Art
Don't

Place elements like washes, text or icons over Avatars.

Accessibility

The avatar should have a text equivalent. Use the accessibilityLabel prop to ensure there is a text description for the image. The VoiceOver description will default to the name prop if accessibilityLabel is not provided.

Make sure that the alternative text properly describes the information and function of the avatar image(s). Depending on the situation, it may be helpful to state the collaborator or company name and/or their verification status.

Localization

Be sure to localize any content in the accessibilityLabel that isn’t a name.

Variants

Fixed sizes

There are 5 sizes available for Avatar. For certain designs you may need a container-based size.

Keerthi
Keerthi
Keerthi
Keerthi
Keerthi

Container-based sizes

Avatars without a size prop will expand to fit the width of their parent container. A common use case is to achieve column-based sizing.

Resize the browser to see these Avatar change to match the width of the Column they have been placed in.

JuliaJ
JuliaJ
Keerthi

Without an image

If there is no image source provided to the Avatar, the first character of
the name provided will be used as a placeholder.

KeerthiK

Verified

For users with verified accounts, use the verified prop to add a checkmark. Be sure to update the accessibilityLabel to include this information as well.

Shanice, Verified account

AvatarGroup
AvatarGroup is the ideal component in cases where multiple people/brands need to be displayed.

AvatarPair
AvatarPair is the ideal solution when you wish to communicate a group of people/brands (ideally two) laid out in a square format.