Structure

Avatars are used to show a thumbnail representation of an individual or entity in the interface.

Avatars can be interactive, in which case has interactive states (hover, focus, etc), or read only, with no interactive states.

avatar structure

For avatars representing the user, the user picture is displayed. If there is an error loading the src of the avatar, there are 2 fallbacks:

  • If there's a name prop, we use it to generate the initials
  • If there's no name prop, we use a placeholder image.

Size

avatar size

Propertyxxlxllgmdsmxs
container size$7 96px$6 64px$5 48px$4 40px$3 32px$2 24px
Icon size"lg" 32px"lg" 32px"md" 24px"md" 24px"sm" 16px"sm" 16px
PropertyTokenPixel
Border strokenot-defined1px
Border stroke: selected, focusnot-defined2px

Avatar groups

In some cases, you might need to stack avatars as a group. To limit the amount of avatars to show, use the max prop. It'll truncate the avatars and show a "+X" label (where X is the remaining avatars).

avatar groups

Propertyxxlxllgmdsmxs
Distance between$9 64px$7 40px$6 32px$5 24px$4 16px$3 12px

Typography

avatar typography

Font sizepxweightsize
xs120.750rem$xs
sm, md140.875$sm
lg161$md
xl, xxl211.3125$lg

Color

avatar color

Property, element - stateTokenHex
Bg color - default, focus, disabled$white#ffffff
Bg color - hover$grey100#
Bg color - selected/pressed$grey200#
Border-color - default, focus, disabled$grey200#
Border-color - hover$grey800#
Border-color - selected/pressed$blue800#
Icon-color/font-color - default, focus, disabled$grey800#
Icon-color/font-color - hover, selected$grey1000#