AvatarLockup

Display a user avatar with additional details such as name, pronouns, and information.

Props

PropTypeDefaultDescription
altstringThe name of the user
size"xs" | "sm" | "md" | "lg" | "xl"xsSize of the avatar: xs = 24px, sm = 32px, md = 40px, lg = 72px, xl = 120px
srcurlURL of the user image
namestringName of the user
pronounsstringPronouns of the user (e.g., "he/him", "she/her", "they/them")
informationstringAdditional information about the user like business unit or title
align"left" | "right"leftAlignment of the avatar lockup
emphasizedbooleantrueWhether to emphasize the avatar lockup ie; the lockup needs to stand out from the other content
lineOfTextbooleanfalseWhether to use within sentence of text
aria-labelstringAn accessible label for the avatar lockup.
data-testidstringA data-testid for the avatar lockup.
aria-labelledbystringIdentifies the element (or elements) that labels the element it is applied to.
aria-describedbystringIdentifies the element (or elements) that describes the element on which the attribute is set.
style{}CSS properties applied to the avatar lockup component.
keystring | numberThe key of the element.

Emphasized

<AvatarLockup size="md" src="https://via.placeholder.com/72" name="First Last" pronouns="he/him" information="Software Engineer" />
<br />
<AvatarLockup size="md" src="https://via.placeholder.com/72" align="right" name="First Last" pronouns="he/him" information="Software Engineer" />
<br />
<AvatarLockup size="md" src="https://via.placeholder.com/72" name="First Last"/>
<br />
<AvatarLockup size="md" src="https://via.placeholder.com/72" name="First Last" pronouns="he/him"/>
<br />
<AvatarLockup size="md" src="https://via.placeholder.com/72" name="First Last" information="Software Engineer" />
<br />
<AvatarLockup name="First Last" pronouns="he/him"/>
<br />
<AvatarLockup name="First Last" />
<br />
<AvatarLockup name="First Last" pronouns="he/him" lineOfText={true}/> used within sentence of text.
<br />
<br />
<AvatarLockup name="First Last" lineOfText={true}/> used within sentence of text.
<br />

De-emphasized

<AvatarLockup size="md" src="https://via.placeholder.com/72" name="First Last" pronouns="he/him" information="Software Engineer" emphasized={false} />
<br />
<AvatarLockup size="md" src="https://via.placeholder.com/72" name="First Last" align="right" pronouns="he/him" information="Software Engineer" emphasized={false} />
<br />
<AvatarLockup size="md" src="https://via.placeholder.com/72" name="First Last" emphasized={false}/>
<br />
<AvatarLockup size="md" src="https://via.placeholder.com/72" name="First Last" pronouns="he/him" emphasized={false}/>
<br />
<AvatarLockup size="md" src="https://via.placeholder.com/72" name="First Last" information="Software Engineer" emphasized={false}/><br/>
<br/>
<AvatarLockup name="First Last" pronouns="he/him" emphasized={false}/>
<br />
<AvatarLockup name="First Last" emphasized={false} />
<br />
<AvatarLockup name="First Last" pronouns="he/him" emphasized={false} lineOfText={true}/> used within sentence of text.
<br />
<br />
<AvatarLockup name="First Last" emphasized={false} lineOfText={true}/> used within sentence of text.
<br />