Avatar
An Avatar displays an image, logo, or initials to help users efficiently identify a person, company, or entity.
When to use
Avatars are used to enable users to quickly identify an object, whether that be a specific user, account, or other entity.
Avatars are always paired with additional information, such as a user's name, for better clarity. If possible, use an image or logo over initials.
The consistent dimensions of an avatar ensure that readability and scanability of content surrounding the avatar is not compromised. For example, when scanning a data table column that contains an avatar of a company’s logo and the company name, the company name stays aligned from one row to the next.
When not to use
Avatars are not the only components that provide visual representation. When applicable, use these over Avatars:
Anatomy
Avatars can be displayed as an image, initials, or a logo. They come in three different sizes:
T-shirt size | Dimensions (in pixels) |
---|---|
small | 24x24px |
medium | 48x48px |
large | 96x94px |
The container of an avatar can be circular or a rounded square based on the use case.
- Use a circular avatar when representing a person by an image or their initials.
- Use a rounded square avatar when representing a company’s or entity’s logo. This can be achieved by applying
round='medium'
to the Avatar. - Always round the edges of a square container when using an avatar.
Accessibility
Inform users of assistive technologies what the avatar represents by including an a11yTitle
. This text will be read out by a screen reader when the user reaches the avatar.
If the avatar acts as a button, the a11yTitle
should also inform the user of what action will occur if clicked.
loading...
Handling logos in dark mode
When possible, provide both a light and dark mode version of a company logo. If a dark mode version of the logo is not available, apply background={{ color: ‘background’, dark: false }}
to the avatar.
Avatar vs. Image
Avatars are not always necessary when presenting a company logo, and in some cases an image is an appropriate choice. For example, when presenting a company’s logo within a grid of cards, an image can be used so that only the height is fixed and the width can grow to fit the logo’s proportions.
In this case, the variable width of the logo does not affect the alignment of text from one card to the next.
My Products
Apache Spark
Open source analytics engine for big data processing, with built-in modules for streaming, SQL, machine learning and graph processing.
CTERA
CTERA’s mission is to enable cloud-driven enterprise IT organizations to deliver secure file services.
SingleStore
SingleStore is the world’s first cloud database which unifies transactions and analytics and provides hybrid and on-premises deployment option.
Starbust Enterprise
Starburst Enterprise is a fully supported, production-tested and enterprise-grade distribution of open source Trino.
Examples
DataTable
Avatars are always used over images within DataTables to maintain visual alignment with paired content. Use size=small
avatars in DataTables.
Name | |
---|---|
Use Avatars to align content.
Name | |
---|---|
Don't use Image or other components to implement company logos. This causes inconsistent alignment with paired content when logos are not square.
When using avatars in a DataTable, always accompany the avatar with another piece of identifying information such as the user or company's name or email. If an image is not available provide an avatar with initials instead. Use avatar with size=small
in DataTables.
Name | |
---|---|
![]() | |
![]() | |
BA Brittany Archibeque | |
![]() | |
![]() | |
JF Jessica Filben |
Include avatars to help the user to quickly scan the table and identify a specific user. Use initials in the avatar when an image is not available.
Name | |
---|---|
![]() | |
![]() | |
Brittany Archibeque | |
![]() | |
![]() | |
Jessica Filben |
Don't remove an avatar if an image is not available. This breaks visual consistency. Instead, use initials as a placeholder.
PageHeader
When applicable, an avatar is aligned to the left of the title within a PageHeader. Use large-sized avatars within PageHeaders.
Account Details
View your account’s general information
Still have questions?
Something missing or looking for more information? Get in touch to help make the HPE Design System better.