









Avatars are used to add a human touch and instant clarity when understanding which user did what in the application. We also use avatars for projects, repositories, spaces and other container metaphors within Atlassian Apps.
API status: | general |
---|---|
Included in AUI core? | Yes. You do not need to explicitly require the web resource key. |
Web resource key: |
com.atlassian.auiplugin:aui-avatars
|
AMD Module key: | N/A |
Experimental API: | 5 |
General API: | 5.1 |
<span class="aui-avatar aui-avatar-xxlarge">
<span class="aui-avatar-inner">
<img src="//docs.atlassian.com/aui/latest/docs/images/avatar-96.png" alt="Person McRealface" />
</span>
</span>
Avatars can be used for "container" objects — projects, spaces, repositories, etcetera — to give them a recognisable visual identity.
<span class="aui-avatar aui-avatar-project aui-avatar-xlarge">
<span class="aui-avatar-inner">
<img src="//docs.atlassian.com/aui/latest/docs/images/project-128.png" alt="Angry Nerds project" />
</span>
</span>
An avatar must include a textual description of the concept it represents, so that its meaning can be conveyed and understood in non-visual contexts as well.
<img>
tag should include an alt
attribute describing the image.
alt
attribute description.
The avatar is related to this heading. If I were using a screen reader here, it would be redundant to hear the name of the project read out twice. So, we prevent the image from being described.
<header class="aui-page-header">
<div class="aui-page-header-inner">
<div class="aui-page-header-image">
<span class="aui-avatar aui-avatar-project aui-avatar-xxxlarge">
<span class="aui-avatar-inner">
<img src="images/project-128.png" alt="" role="presentation" />
</span>
</span>
</div>
<div class="aui-page-header-main">
<h2>Angry Nerds project</h2>
<p>
The avatar is related to this heading. If I were using a screen reader here,
it would be redundant to hear the name of the project read out twice. So,
we prevent the image from being described.
</p>
</div>
</div>
</header>
Avatars may have a single additional element overlaid in one of their four corners.
Use badged content to represent the type, permission, presence, or other contextually relevant information about the user or container.
The badged content must also include a textual description of the information it represents, so that its meaning can be conveyed and understood in non-visual contexts as well.
<span class="aui-avatar aui-avatar-xxlarge">
<span class="aui-avatar-inner">
<img src="//docs.atlassian.com/aui/latest/docs/images/avatar-96.png" alt="Person McRealface" />
</span>
<span class="custom-presence-indicator">
<svg height="100%" version="1.1" viewBox="0 0 8 8" width="100%" xmlns="http://www.w3.org/2000/svg">
<description>Online</description>
<circle cx="4" cy="4" r="4"></circle>
</svg>
</span>
</span>
.aui-avatar .custom-presence-indicator {
/* position the indicator. AUI Avatars are a relative container. */
position: absolute;
bottom: 0;
right: 0;
/* size the indicator appropriately. content should not appear outside the indicator. */
width: 16px;
height: 16px;
overflow: hidden;
/* style the indicator. */
color: #00875A;
border: 3px solid #fff;
border-radius: 100%;
fill: #00875A;
}