Avatar

Represents a person or organisation with initials, and optionally shows that they are online.

Refined portVue source: WildAvatar.vueStorybook story: Data Display/AvatarReact component: WAvatar

Try it

Turn on the dot, then step down through the sizes.

Content
Size
Family
Initials
Square
Dot
<WildAvatar
  size="md"
  color="blue"
  src="/team/aroha.jpg"
/>
Show the dot at 32px and up. It never shrinks below 8px, so on a smaller avatar it covers a third or more.

When to use

  • Use an avatar to mark a person or organisation in a list: an activity row, a table cell, a stacked group.
  • Use round for people and square for organisations and sites. Don’t mix the two in one list.
  • Use the dot for presence only. It has one meaning: online.
Don’t use it
  • As the only label. Put the name in text beside it.
  • To show a status. Use a badge.

Sizes

Eight, from 16 to 64px, so one avatar works in a table cell and on a profile screen.

J
3xs · 16
J
2xs · 20
JM
xs · 24
JM
sm · 32
JM
md · 40
JM
lg · 48
JM
xl · 56
JM
2xl · 64
<WildAvatar size="sm" initials="JM" color="blue" />
<WildAvatar size="md" src="/team/jm.jpg" alt="Joel Mann" />
Keep the three smallest for dense rows. Below 24px only the first initial is drawn, because two letters at 16px can’t be read.

Colour families

Six. Pick the family from the name, so the same person is the same colour on every screen.

JM
blue
JM
green
JM
orange
JM
red
JM
purple
JM
neutral
Each family is a light tint under a dark ink, so initials stay readable at 16px.

Shape and presence

JM
round
JM
square
JM
dot
JM
square · dot
The dot is a quarter of the avatar with a 2px white ring, so it shows on every family.
WE
xs
WE
sm
WE
md
WE
lg
Square is for organisations and sites; round is for people.

Accessibility

An avatar isn’t focusable, and its initials are read out as letters. The dot is announced as “Online”.

  • Keep the person’s name in text beside the avatar.
  • Give a photo an alt, or leave it empty when the name sits beside it.

Props

PropTypeDefaultDescription
size'3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl''md'16, 20, 24, 32, 40, 48, 56 or 64px.
initialsstring—One or two letters. Only the first shows below 24px.
srcstring—Photo URL. Replaces the initials.
altstring''Text alternative for the photo.
color'blue' | 'green' | 'orange' | 'red' | 'purple' | 'neutral''blue'Colour family behind the initials.
squarebooleanfalse8px corners, for organisations and sites.
dotbooleanfalseGreen presence dot, announced as Online.
styleCSSProperties—Merged onto the outer box.

Tokens

TokenValueWhere it lands
--radius-full9999pxThe round shape.
--radius-lg8pxThe square shape.
--color-primary-light#EBFAFFBlue family ground.
--global-blue-1100#0C296ABlue family initials, 12.75:1 on the blue ground.
--color-grey-900#4F4D55Neutral family initials.
--color-success#019939The presence dot.
--font-weight-semibold500Initials.