Anatomy
![anatomy of the avatar component](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_2864_e256eae46f_0ca3ec75d8.png)
- Identifier: Distinguishes users from each other
- Presence icon (optional): Shows the online presence of the user
Subcomponents
See the usage guidelines for icon.
Usage
Learn how to use avatar for a card, global header, chat, or profile. Avatar can represent a user or show something the user is assigned to (like a task).
Cards
You can use a small avatar to identify users associated with a card.
![3 medium sized avatars with photos of each user shown on a card](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_2886_f5432cc266_de4455c5d7.png)
In this example, three users are assigned to an activity in the card.
An avatar in a card can also provide visual information about a user.
![a contact card with an image avatar](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_2916_1ef87076e1_3cbb075c2e.png)
In this example, an image avatar adds context to the user's profile information.
Global header
You can use a small avatar in a global header to indicate that a user is signed in.
![Now black heading bar showing an image avatar of a user](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_2925_72ec14f309_65a66e3ca0.png)
In this example, the image avatar is a visual reminder that the user is signed in.
Chat
You can use a medium avatar to identify users in a chat.
![medium image avatars shown next to chat messages](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_2937_27ba2d42a7_913aaa1365.png)
In this example, the image avatar adds context to the user's profile information.
Profile
Use a large or extra-large image avatar in the user's profile to help distinguish users from one another. A user can also change their image by editing their profile.
![extra large image avatar shown with user's profile info](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3031_d7b1f0a388_a1446c5a66.png)
In this example, the image avatar highlights the user's personal information.
Variants
Learn about avatar and find out how to use it in your design.
Types
The user avatar has the following types. If more than one is set, image is the highest priority moving down the list to the lowest priority anonymous icon.
Type | Usage | Example |
---|---|---|
Image | You can display this avatar if a user has uploaded an image file. | ![]() |
Icon image | You can display any existing icon as an avatar icon – including icon component custom images. | ![]() |
Initials | You can display this avatar if a user has provided their first and last names. | ![]() |
Anonymous icon | You can display this as the default avatar or show it when a user's image or initials aren't available. | ![]() |
Sizes
Avatar has the following sizes: extra-small (xs), small (sm), medium (md), large (lg), and extra-large (xl). The size you choose depends on your use case.
Extra small
Use the extra-small avatar with a small pill.
![extra small avatar](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3099_c85f962ea3_1bc71886d6.png)
Small
Use a small avatar for a page header or banner to show the relevant user, such as someone signed into their account.
![small image avatar](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3109_c3ec847d37_e2a9cfb6db.png)
Medium
Use the medium size when you're identifying a user within a list or other component (like a card). Medium is the default size for the component.
![medium image avatar](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3118_bfa833081c_3a770c7bca.png)
Large
Use the large size when you're displaying a profile view page.
![large image avatar](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3127_52cdbbbbcc_7175d5f0aa.png)
Extra-large
Use the extra-large size to distinguish a user on a profile edit page.
![extra-large image avatar](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3136_555c80b937_6e7a2b9b19.png)
Configurations
Learn how to customize avatar by configuring the available properties.
Interactive property
The Interaction property controls how an avatar responds to user interactions. By default, this property is set to “None,” but you can change its value to determine how the avatar behaves when a user selects it.
None
![None alt text](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_4060_1040_5cf5d875d3_ae52ca453c.png)
In this example, the interaction property is set to “None.” The cursor remains the default arrow, indicating that the avatar does not respond to user interactions.
Button
![None alt text](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_4060_1050_c84d5fce42_15ec7b977f.png)
In this example, the interaction property is set to “Button.” The cursor changes to a pointer cursor, indicating that the avatar can be selected like a button.
Link
![None alt text](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_4060_1060_18ae8e7146_6c4df33411.png)
In this example, the interaction property is set to “Link.” The cursor also changes to a pointer cursor, indicating that the avatar can be selected to follow a link.
Presence icon
You can configure the optional presence icon with the avatar in any of the following states to show the online status of a user. The presence icon always appears in the lower right of the avatar.
Status | Example |
---|---|
Available | ![]() |
Busy | ![]() |
Away | ![]() |
Offline | ![]() |
Tooltip for username
The default tooltip shows text with a full username and a status to help identify an avatar with initials only. The tooltip can be disabled if it's a distraction or not needed.
By default, the entire name is displayed in a tooltip. For a compound name, the avatar only shows the initials of the first and last names (for example, Nicholas-Allen Moon).
![tooltip with full username and status for initials avatar](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3180_2a20865b0c_14d9cae619.png)
Design recommendations
Learn how to apply avatar in your design.
![three medium avatars side by side](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3203_75509edf2b_085ff7d6e2.png)
Use consistent avatar sizes when displayed together.
![3 avatars next to each other, one small, one medium, and one large](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3192_a3185accd0_c9a7fb904c.png)
Avoid using a mix of avatar sizes that display together. This creates design imbalance.
![small avatar in bottom corner of card](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3242_f2c498ac29_02a6176223.png)
Consider small or medium avatar sizes to complement the visual balance of surrounding elements.
![large avatar taking up half of card space from text](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3214_6c42eecbc3_0effc85a29.png)
Avoid using a large or extra-large avatar if it disrupts the visual balance of surrounding elements.
UI text guidelines
If you include a tooltip on hover, consider what information would be most useful for the person to know (like name or title).
Behavior
Learn how avatar behaves when the display changes or a user interacts with the component.
States
Avatar doesn't have any states. However, the subcomponents within avatar have their own states. If you include a presence icon with the avatar, it displays the user's online status. A tooltip will also appear in the hover state that displays the user's online status and full name.
Interactions
Learn how avatar responds when a user interacts with it.
Selection
Depending on the interaction property setting, users can select the avatar to trigger an associated action or open a link.
![None alt text](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_4060_1448_27bbb20840_ed45e3f374.png)
If the interaction property is set to “Button” or “Link,” users can select the avatar, indicated by the pointer cursor.
Tooltip
When hovering over an avatar, the tooltip automatically appears.
![None alt text](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_4061_1489_4501a66696_d5c085f7c4.png)
Hovering over the avatar triggers a tooltip that displays the username.
Usability
Avatar complies with all internationalization and accessibility requirements.
Internationalization
The avatar's appearance doesn't change when the display translates to a right-to-left (RTL) language. However, if you're using a presence icon with an avatar, the presence icon flips its position to the left side of the avatar.
![anonymous icon avatar in internationalization format](https://static.horizon.servicenow.com/assets/component_usage_guidelines/now_avatar_yokohama_3996_3279_7f44b427c9_4222db6602.png)
Accessibility
Learn how to access the actionable elements of avatar through keyboard interactions.
If an avatar is an image by itself and not actionable (no links, tooltips, or buttons) the minimum requirement is an alt description identifying the user and their presence status (for example, "Jane Jones is online").
- If an avatar icon is actionable, the icon should be part of the tab order on the page and have keyboard actions.
Keyboard interactions
You can access the actionable elements of avatar with these keyboard keys:
- Tab: Moves focus to an avatar if that avatar has any associated actions
- Space or Enter: Selects the avatar and opens any applicable actions; for example, when the avatar is a dropdown for profile information