Avatar
An avatar component represents an object or entity.
Last updated
An avatar component represents an object or entity.
Last updated
The Avatar is also available as an Experience Cloud Component.
The Avonni Avatar component allows your users to express themselves visually by choosing an image or icon that represents them within your application.
As an option, text can be added to the avatar component to illustrate it. Primary and secondary text, as well as tags, can be used to highlight specific information.
In some cases, you might need to show additional information visually. Status
, Presence
and Entity
are a great way to achieve this.
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 create interactions with the avatar. Actions are only displayed with the avatar size set to small or above.
From the interactions panel, you can 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.
From the Styles panel, you can define Primary Text
, Secondary Text
, Tertiary Text
, Icon
, Border
, Initials
, Presence
and Status
for the Avatar.
You can find the instructions for styling here.
The following examples demonstrate some of the available functionality for the Avatar component.
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. |