Avatar
An avatar component represents an object or entity.
The Avatar is also available as an Experience Cloud Component.
Overview
The Avatar Component allows users to view and select avatars or use icons. It is typically used in applications where users can choose an avatar or icon to represent themselves, such as in social media or online gaming platforms.
Overall, the Avatar Component is a valuable component for allowing users to personalize their online presence and express their identity in a visually appealing way.
This page walks you through:
Changing the Properties
Adding Text information
As an option, text can be added to the avatar component to illustrate it. Primary and secondary text can be used as well as tags to highlight specific information.
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252F7Njek0bKN0KVyBJ7zWho%252F2022-10-04_20-46-29.png%3Falt%3Dmedia%26token%3D1a1d1696-cbf5-4a0f-879d-550159678752&width=768&dpr=4&quality=100&sign=75f02d72&sv=1)
Adding Status, Presence and Entity
In some cases, you might need to show additional information visually. Status
, Presence
and Entity
are a great way to achieve this.
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252F4CZA0GkqlCqowEjhmw2I%252F2022-10-05_21-06-54.png%3Falt%3Dmedia%26token%3D3288b5e9-a9b9-43ce-ba15-cecea0540b4f&width=768&dpr=4&quality=100&sign=645fc91b&sv=1)
Adding Actions
Actions give users a quick way to accomplish a task inside Salesforce. For example, when a user taps on a Button, the action that should be performed can be specified from the interactions tab. On an avatar, actions append a dropdown menu next to the avatar.
Adding actions is required to be able to create interactions with the avatar. Actions are only displayed with the avatar size set from small and above.
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252F6dWZh3dkqwqxNvHcH3gX%252F2022-10-04_21-11-03.png%3Falt%3Dmedia%26token%3De760b5e7-9601-4e4e-b401-2253897e366d&width=768&dpr=4&quality=100&sign=f57c774d&sv=1)
Adding Interactions
From the interactions panel, you are able to create interactions when users click on an activity item and/or an action. For example, you may want to redirect users to the record page when they click the activity item link.
Here is a full list of actions you can add to the avatar.
Styling the Avatar
From the Styles panel, you are able to define Primary Text
, Secondary Text
, Tertiary Text
, Icon
, Border
, Initials
, Presence
and Status
for the Avatar.
You can find the instructions for styling here.
Tutorials
The following examples demonstrate some of the available functionality for the Avatar component.
Specifications
Attribute | Type | Description |
---|---|---|
Initials | String | If the record name contains two words, like first and last name, use the first capitalized letter of each. For records that only have a single word name, use the first two letters of that word using one capital and one lower case letter. |
Fallback Icon Name | String | The Lightning Design System name of the icon used as a fallback when the image fails to load. The initials fallback relies on this for its background color. |
Image Source | The path to the image. | |
Variant | String | The variant changes the shape of the avatar. |
Size | String | The size of the avatar. |
Last updated