Beta Preview

Avatar

An avatar is a thumbnail representation of an entity, such as a user or an organization.

Avatar
isOverBackground 
import {Avatar} from '@react-spectrum/s2';

<Avatar
  src="https://i.imgur.com/xIe7Wlb.png"
  alt="Avatar" />

API

NameTypeDefault
altstringDefault: —
Text description of the avatar.
srcstringDefault: —
The image URL for the avatar.
stylesDefault: —
Spectrum-defined styles, returned by the style() macro.
size16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 96 | 112 | number & {}Default: 24
The size of the avatar.
isOverBackgroundbooleanDefault: —
Whether the avatar is over a color background.