Avatar
Avatar
is a component that displays a profile picture or an icon with initials representing a user.
ARIA Roles and Attributes
Component | Role and Attributes | Usage |
---|---|---|
Avatar | role="img" | Indicates that it is an image. |
name | The name of the person represented by the avatar. | |
alt | Alternative text for the avatar image. If alt is not set, the value of name is used. | |
src | The path to the avatar image. | |
aria-label | If src is not set or the image has not loaded, the value of name is used. If name is not set, the value of alt is used, and if alt is not set,"Avatar Icon" is used. | |
AvatarGroup | role="group" | Indicates that it is a group. |
Edit this page on GitHub