Skip to main content
  1. Docs
  2. Components
  3. Data display

Avatar

A person, or an organisation, application or tenant: their photo or logo, or their initials.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<span role="img">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • Who someone is, in a list, a menu or a header.
  • A tenant or an application, as a square.
Not for

02

Anatomy

  1. 1avatar<span role="img">Named by name: one image to a screen reader.
  2. 2avatar-fallback<span>The initials, while the photo loads or when it fails; avatar-image once it's in.
  3. 3avatar-status<span>The status dot on the bottom-end corner, cut out of the avatar with a 2px gap.

03

Do and don't

Squares for things
DoA tenant as a square: it never reads as a person.
Don'tA tenant as a circle, among people.
Say the status too
DoWhere the status matters, it's in words beside the name.
Don'tThe dot alone beside a name: the avatar is decorative, so no one hears it.

04

Sizes

Fixed, at every density.

SizePixelsStatus dotFor
sm248A table row, an avatar group
md3210A list or a menu: the height of two lines
lg4012A header, a card
xl4814A profile

05

Content

  • name is the person's full name, as they write it.
  • For an organisation, its name without Pvt Ltd or Inc.
  • decorative when the name is written beside it, so it isn't read twice.
  • A status label in words, as a person would say it: "Online", "Away", "In a meeting".
Next — AvatarAPI