With image

<Avatar src="https://example.com/user.jpg" alt="Jane Doe" />

Initials from name

<Avatar name="Jane Doe" />
<Avatar name="John Smith" color="blue" />
<Avatar name="Alice" color="green" />

Custom placeholder

<Avatar>
  <UserIcon />
</Avatar>

Variants

<Avatar name="AB" variant="filled" />
<Avatar name="AB" variant="light" />
<Avatar name="AB" variant="outline" />
<Avatar name="AB" variant="transparent" />
<Avatar name="AB" variant="default" />

Size

<Avatar name="JD" size="xs" />
<Avatar name="JD" size="sm" />
<Avatar name="JD" size="md" />
<Avatar name="JD" size="lg" />
<Avatar name="JD" size="xl" />

Radius

<Avatar name="JD" radius="xs" />
<Avatar name="JD" radius="sm" />
<Avatar name="JD" radius="md" />
<Avatar name="JD" radius="lg" />
<Avatar name="JD" radius="xl" />
<Avatar name="JD" radius={0} />  {/* square */}

Props

PropTypeDefaultDescription
srcstring—URL of the avatar image
altstring—Accessible image description; also used as aria-label
namestring—Full name — initials are auto-derived when no src or children
variant'filled'|'light'|'outline'|'transparent'|'default'|'white''light'Placeholder background variant
colorUiColor—Theme color for the placeholder
size'xs'|'sm'|'md'|'lg'|'xl'|number|string—Width and height (number → rem)
radius'xs'|'sm'|'md'|'lg'|'xl'|number|string—Border-radius