Avatar
Overview
Torq offers customisable Avatars that use images, icons, initials or logos to represent a user or entity. Avatars allow for personalisation in user profiles and enhances recognition throughout the product.
Live demo
Usage
Do
Prioritise images and icons over text.
Use the user's actual initial to provide visual cues for user identification and personalisation to enhance user interaction.
Provide users with the option to customise their Avatars by uploading an image.
Ensure Avatar loading and rendering are optimised for performance, especially in scenarios with multiple avatars on a page.
Ensure Avatars adapt to different screen sizes and maintain readability and clarity.
Don't
Avoid using low-quality or pixelated images for Avatars, as they can negatively impact the user experience.
Ensure that the initial used in the fallback are easily readable and distinguishable.
Don't display Avatars in shapes other than a circle.
Placement
The Avatar component is commonly placed in multiple contexts, including:
User profiles
User comments
Messaging applications
Company logos
Sizes
| Example | Size |
|---|---|
| Small | |
| Medium | |
| Large |
Styles
| Example | Type |
|---|---|
| Photo | |
| Initial | |
| Icon | |
| Brand logo |
Accessibility
To ensure that the Avatar component is accessible to all users, follow these best practices:
Provide meaningful alt text for Avatar images to ensure users with visual impairments can understand the content.
Ensure there is sufficient contrast between the Avatar and its background for improved visibility.
Make sure Avatars are accessible via keyboard navigation, allowing users to interact with them without a mouse.
Use ARIA roles appropriately to enhance the accessibility of Avatars for screen reader users.
Implement clear focus styles to indicate when an Avatar is selected or in focus for users navigating with a keyboard.
iOS guidance
Along with the guidance above, there is some iOS specific guidance for this component.
Ensure that Avatars adapt to iOS Dynamic Type settings, allowing users to customise text size for better readability.
Implement haptic feedback when users interact with avatars, providing a tactile response to enhance the overall user experience.
Leverage iOS-specific accessibility features, such as VoiceOver and Switch Control, to ensure Avatars are accessible to users with diverse needs and abilities on the iOS platform.
Use ARIA roles appropriately to enhance the accessibility of Avatars for screen reader users.
Implement clear focus styles to indicate when an Avatar is selected or in focus for users navigating with a keyboard.