Skip to content

Avatar

Props

API reference for Avatar. For usage examples, see the React tab.

Avatar.Root

NameTypeDefault
childrenReactNode

The content or child elements nested within this component.

color"blue" | "cream" | "darkGray" | "darkGreen" | "darkPurple" | "gray" | "lightBlue" | "lightGreen" | "lightOrange" | "lightYellow" | "navy" | "pink" | "purple" | "red" | "yellow"

Accent color for fallback initials, icons, and outlined borders. Omit to inherit brand colors from the surrounding app theme.

size"lg" | "md" | "sm" | "xs"md

Size of the Avatar.

variant"filled" | "outlined"filled

Filled or outlined Avatar.

Avatar.Fallback

NameTypeDefault
childrenReactNode

The text, image, or icon of the Avatar.Fallback.

Avatar.Image

NameTypeDefault
aboutstring
accessKeystring
altstring
autoSavestring
childrenReactNode
colorstring
contentstring
contextMenustring
crossOriginCrossOrigin
dangerouslySetInnerHTML{ __html: string | TrustedHTML; }
datatypestring
decoding"async" | "auto" | "sync"
defaultCheckedboolean
exportpartsstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts (opens in new tab)

fetchPriority"auto" | "high" | "low"
heightstring | number
inlistany
inputMode"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url"

Hints at the type of data that might be entered by the user while editing the element or its contents

See: https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute (opens in new tab)

itemIDstring
itemPropstring
itemRefstring
itemScopeboolean
itemTypestring
loading"eager" | "lazy"
partstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part (opens in new tab)

prefixstring
propertystring
radioGroupstring
referrerPolicyHTMLAttributeReferrerPolicy
relstring
resourcestring
resultsnumber
revstring
securitystring
sizesstring
srcstring
srcSetstring
titlestring
typeofstring
unselectable"off" | "on"
useMapstring
vocabstring
widthstring | number