Components
AvatarAvatar visually represents a user or entity, typically using an image, initials, or a placeholder. Indicators, such as badges or status icons, are placed with an outline to create contrast and ensure clear distinction between the Avatar and the associated information.
Usage
The Avatar is used to visually represent users or entities in a compact and recognizable way. It is commonly applied in scenarios such as
- User Profiles : Displaying a user’s photo, initials, or a placeholder when no image is available.
- Collaboration Tools : Identifying team members, contributors, or participants in a group setting.
- Status Indicators : Highlighting real-time information, such as online/offline status
Avatar types
The Avatar component is available in three distinct variations: Text , Image , and Signed out . Each variation suits a different user state.
Text
When an Avatar is assigned to a user, it defaults to displaying the first letter of the user's name as the primary visual element. This ensures a clear and meaningful representation of the user, even in the absence of a custom image or icon.
Image
When an image is provided for an Avatar, it takes precedence and replaces the default first-letter representation. The image is displayed as the primary visual element, offering a more personalized and identifiable representation of the user.
Signed out
The Signed Out Avatar is displayed when no user is logged in. It serves as a placeholder to indicate the absence of an active user, ensuring a consistent visual experience even in an unauthenticated state.
Avatar sizes
Avatar is available in seven sizes to suit various contexts and layouts:
16 px – XXS
24 px – XS
32 px – S
40 px –M
48 px – L
56 px – XL
64 px – XXL
Anatomy
Text
- Container
- Text
Image
- Container
- Image
Signed Out
- Container
- Icon
Behaviour
The Avatar component dynamically adapts its appearance based on the user's state and the provided data.
Placement
Place Avatar consistently within layouts and adjacent to the content it identifies.
Avatar with Badges
The Avatar component can be enhanced with badges to provide additional context or status information about the user or entity it represents. Badges are typically displayed as a small, circular indicator overlaid on the Avatar in the top right corner.
The badges are available in three distinct colours, each representing a specific purpose:
- Important (Red) : Used to highlight critical or urgent information that requires immediate attention.
- Attention (Yellow/Orange) : Indicates a warning or a situation that needs acknowledgment but is less urgent than "Important."
- Success (Green) : Represents positive or confirmed statuses, such as "online" or "completed."
- Neutral represent a less important status or add on.
Examples
Signed-out
Signed-out avatar used to indicate a sign in call to action.
Text
The "Signed-in Avatar" represents a logged-in user. By default, the Avatar displays the first letter of the user's name.
Image
If the user has actively changed the Avatar to an image, the image will be shown instead.
Best practices
Content
Badges with text should be short and descriptive. Aim for one or two words that describe a state. Don’t try to include too much.