Draft. Ported from control-center’s Avatar and restyled with Beehexa tokens. Not yet approved; the API may still change.
An avatar shows a person or an account as a round photo, or as initials when there is no photo.
When to use
- Next to a person’s name: in a member list, a comment, the account menu or the header of a profile.
- To show who is on a record: the editors of a connection, the people assigned to an order, as a group.
- With a status dot, when a person’s availability matters, such as who is online in a support team.
When not to use
- For a company, a store or a connected app. Use its logo in a square tile, not a round avatar.
- As the only place a name appears. Initials alone don’t say who someone is. Show the name next to it, or give the avatar a name.
- As a button. If clicking it opens a menu, put the avatar inside a Button or a menu trigger, which carries the name and the focus ring.
Sizes
| Size | Height | Use |
|---|---|---|
sm |
24 px (avatar.size.small) |
Dense tables and lists |
default |
32 px (avatar.size.default) |
Everywhere else |
lg |
40 px (avatar.size.large) |
Profile and page headers |
Each step is the height of the matching control size, so an avatar lines up with buttons and fields in the same row.
Content
- Initials: one or two letters, the first letters of the name people use. Vietnamese names: the given name and family name in the order the product shows them.
- Photo: let
AvatarImageload it; the initials show until it loads and when it fails. - Status dot: one size, 8 px, at every avatar size. Write the status in the badge slot (it is read by screen readers) and, where it matters, next to the name. Colour alone never carries the status.
- Groups: show three or four avatars, then the rest as a count (“+3”). Give the group a name that says what it is: “6 people can edit this connection”.
Tokens
| Part | Tokens |
|---|---|
| Size | avatar.size.small, .default, .large |
| Shape and edge | radius.pill; border.width.default in color.border |
| Initials | color.background.neutral, color.text, font.label.default (font.label.small when small) |
| Status dot | avatar.badge.size; color.background.{status}.bold; a border.width.selected ring in color.surface |
| Group | overlap space.100, ring border.width.selected in color.surface; count in color.text.subtle |