Components
Avatar
An identity mark with an image, initials or an icon fallback. Group handles overlap and the +N overflow.
Individual
Group
Sizes
Group sizes
Image with fallback
BIUsage
An identity mark in a row, list or group of people.
Do and don't
- Do. Give a meaningful avatar a name and provide initials or an icon fallback.
- Don't. Use it for a logo or decorative art; keep those as images.
Anatomy
Avatar is the container. AvatarImage shows once it loads and hides on error. AvatarFallback or AvatarIcon sits underneath and appears when there is no image. AvatarGroup arranges several avatars with overlap and a +N chip.
Variants
- Image. A real image, with initials underneath if it fails.
- Initials. Two letters from a name, sized to the avatar.
- Icon. A generic person glyph when there is no name.
- Shape. Circle by default. Square follows a sharp shape preference, or pass
shape="square".
Sizes
xs 24px, sm 28px, md 32px, default 36px, lg 40px, xl 48px and 2xl 64px. Group accepts the same size values and applies them to its children.
Props
Avatar:size,shape,name,decorative.AvatarImage: standard image attributes;altdefaults to empty.AvatarGroup:size,shape,max.
Accessibility
A meaningful avatar uses name so it is announced as an image with a label. A decorative avatar passes decorativeand is hidden. A group's +N chip has an accessible label. Never put actions inside an avatar; wrap it in a button if it must be clickable.
Related
Shape follows Expressions and the global shape preference. Sizes follow the ladder in Layout & Spacing.