Avatar

Also known as: Profile image, User icon

Resources

Properties

PropertyValuesDefault
Variant VariantInitials | Picture | IconIcon
Size VariantXs | Sm | Md | Lg | Xl | 2XlMd
Initials TextstringDS
Icon InstanceSwapAny iconuser

Best practises

  • Use avatars to visually represent users, accounts or entities.
  • Use a recognizable image, initials or icon to represent entities.
  • Provide fallback content for the image or initials.

Variants

Some common variants are already created and ready to use (see the table), but you have the possibility to add new variants or customize every visual aspect through tokens and token modes.

VariantFill | Soft | Outline

Size

Dimensions of the avatar are tied to the global scale tokens. This ensures that the components with similar size settings remain consistent across the interface. scale tokens also provides more granular control over dimensional settings.

scale.css
--scale-width-<size>
--scale-height-<size>
--scale-radius-<size>
--scale-icon-size-<size>
--scale-text-size-<size>
--scale-text-height-<size>