This guideline now covers both SAPUI5 and SAP Web Components. Learn more.
Information
Icon
false

Intro

Avatars are visual representations of users, products, or business entities, helping people quickly identify them within an application. Users can be shown with their own photos or initials, while products can be depicted with representative images or logos.

Avatar examples: user photo, initials 'SD', standard user placeholder icon

Examples of a user image, user initials, and standard user placeholder icon

Component availability

This component is available in the following libraries:

<div> <div data-valign="middle">Library</div> <div data-valign="middle">Technical Name</div> <div data-valign="middle">Identifier</div> </div> <div> <div data-valign="middle">SAPUI5 Demo Kit</div> <div><a href="https%3A%2F%2Fui5.sap.com%2F%23%2Fentity%2Fsap.m.Avatar">sap.m.Avatar</a></div> <div data-valign="middle">:badge, info, large, _, SAPUI5:</div> </div> <div> <div data-valign="middle">SAP Web Components</div> <div data-valign="middle"><a href="https%3A%2F%2Fui5.github.io%2Fwebcomponents%2Fcomponents%2FAvatar%2F">ui5-avatar</a></div> <div data-valign="middle">:badge, info, large, _, SAP Web Components:</div> </div> <div> <div data-valign="middle">SAP Web UI Kit (Figma)</div> <div data-valign="middle"><a href="https%3A%2F%2Fwww.figma.com%2Fdesign%2FSILcWzK5uFghKun9jx6D7c%2FSAP-Web-UI-Kit%3Fm%3Dauto%26node-id%3D2-1354%26t%3DF9pseQ9DaDQ8KiI1-1">Avatar</a></div> <div data-valign="middle">:badge, info, large, _, Figma:</div> </div>
<div> <div data-valign="middle">Library</div> <div data-valign="middle">Technical Name</div> <div data-valign="middle">Identifier</div> </div> <div> <div data-valign="middle">SAPUI5 Demo Kit</div> <div><a href="https%3A%2F%2Fui5.sap.com%2F%23%2Fentity%2Fsap.m.Avatar">sap.m.Avatar</a></div> <div data-valign="middle">:badge, info, large, _, SAPUI5:</div> </div> <div> <div data-valign="middle">SAP Web Components</div> <div data-valign="middle"><a href="https%3A%2F%2Fui5.github.io%2Fwebcomponents%2Fcomponents%2FAvatar%2F">ui5-avatar</a></div> <div data-valign="middle">:badge, info, large, _, SAP Web Components:</div> </div> <div> <div data-valign="middle">SAP Fiori for Web UI Kit (Figma)</div> <div data-valign="middle"><a href="https%3A%2F%2Fwww.figma.com%2Fcommunity%2Ffile%2F1494295794601744471%2Fsap-fiori-for-web-ui-kit">Avatar</a></div> <div data-valign="middle">:badge, info, large, _, Figma:</div> </div>

When to Use

2
do
false

Use the avatar to:

  • Display user photos, initials, or placeholders for personal identification.
  • Show standardized images for business content such as products, parts, logos, or campaign visuals.
  • Represent concepts or entities with icons when images aren’t available.
  • Present images with transparent backgrounds when needed for clarity or design fit.
  • Provide placeholder images when no other source image is available.
  • Apply avatars consistently in places like lists, cards, and headers to create familiarity and a uniform visual pattern across the interface.
dont
false

Don’t use the avatar to:

  • Display pictures in a sequence, such as a slideshow or carousel. Instead, use the carousel component.
  • Display an interactive icon. Instead, use the button with an icon inside.
  • Use a circle for people and a square for product or business-related images.
  • Use the predefined sizes. If you need a custom size, follow these guidelines.
  • For product icons, replace the default icon with a more suitable icon for your use case.
  • Provide a clear alternative text for the avatar image.
  • For interactive avatars and badges, provide both a tooltip and an alternative text.
  • Avoid unnecessarily large files.
  • Avoid badges on avatars smaller than size S.
  • Don’t attach actions to icons in the avatar.

Anatomy

  1. Avatar: Main avatar component with different display options. See Types.
  2. Border (optional): An avatar can have a very subtle border.
  3. Badge (optional): Displays a visual indication of the action triggered when clicking the avatar.

Avatar anatomy with numbered pointers: 1. main component, 2. optional border, 3. optional badge

Anatomy of an avatar

Types

Content types

Avatars represent people, products, or business objects, and can display a photo, initials, or a placeholder icon.

A: User photo or business image
B: User’s initials
C: Placeholder icon

Avatar types: A. user photo, B. initials 'SD', C. user placeholder icon

Avatar types

Images

Use images for avatars when representing people or business content. Avatars can display either user or business images.

The avatar component can be configured in various shapes. For more information on the shape types and their usage, see the Shape Types section.

Optimize high-resolution images to avoid unnecessarily large files. Large image files can severely impede page performance.

The examples below show square avatars for business content.

Square avatars: tennis court, chocolate bars, sampling bottle with lavender pieces

Examples of business images

Initials

The initials stand for the first and last name of a person – for example, JD for Jane Doe, or MvV for Marjolein van Veen. The order of the initials depends on the language – for example, first name before last name in English.

Initials can have up to three alphabetical characters (A-Z, a-z). If more than 3 initials are required for longer names (such as Anna María Agustí Suárez), the gender-neutral placeholder icon is displayed instead. The placeholder is also used if the three letters don’t fit into the circle (for example, WWW).

Initials in circular avatars: 'A', 'KM', 'BvV', 'WWW'

User initials with 1, 2, and 3 characters

Placeholder icons

Placeholder icons are used for both user and business images when no other image is available:

Default placeholders: circular person icon, square product icon

Default person and product placeholders

You can specify your own default placeholder icon for business images. Always replace the default product icon if there is a more suitable icon for your use case and industry.

Custom product avatars: leaf, football and building icons

Product placeholders with custom icons

Background color

The background color is set to blue by default. However, to add more visual variety to the UI, you can change the background color using one of the following options:

All avatar colors can be themed.

Initials in circular avatars in 10 accent colors: ZR, UE, ZHK, I, DdV, JK, VM, KBM, SP, OW

User initials in all 10 accent colors

For images in the content area, use the background color “placeholder” to keep the primary focus on the text. This approach ensures that image content plays a secondary role.

Mountain illustration and placeholder icon with neutral background

Image and placeholder icon with background color “placeholder”

You can use images with transparent backgrounds to display descriptive illustrations and visuals.

Mobile phone and bank notes icons with transparent backgrounds

Images with transparent backgrounds

You can use the avatar component to display icons as non-interactive elements. To do this, apply the background color “placeholder”.

Don’t use icons as images. Icons are usually part of an icon font.

Don’t apply actions to icons. If you want to place an action on the icon, use the button with an icon inside instead.

Four icons: swimming, droplet, earth globe, magic wand

Icon examples with background color “placeholder”

Interaction types

From an interaction standpoint, an avatar can be one of two types:

Users can press or click an interactive avatar to trigger an action.

Interactive avatar with a user photo – with badge (A), non-interactive avatar with user initials SD – without a badge (B)

Interactive avatar (A) and non-interactive avatar (B)

If the avatar is interactive, you can display a badge with an icon. The badge signals that the avatar is interactive, and the icon indicates the action that will be triggered. This is especially useful for images.

Avoid badges on avatars smaller than size S to preserve visibility. Always include a tooltip that describes the action.

Avatar with user photo and a magnifying glass badge (zoom), avatar with party lights and a pencil badge (edit), avatar with a leaf icon and a camera badge (upload).

Avatars with badges for zoom in (left), edit (center), and change picture (right)

Shape types

The avatar component can be configured to display in various shape types, including circular or square, to best represent different types of entities.

Use a circle for people and a square for product or business-related images. Circles emphasize individuality and work best for people, while squares convey structure and are better suited for products, companies, or other business objects. This distinction helps users quickly recognize whether content represents a person or a business.

In general, the avatar component is typically used in a circular or square shape. Custom shapes can be defined using CSS classes.

Shapes: circular avatars – user photo, initials, user icon; square avatars: product (laptop), initials, placeholder icon

Avatar shapes

Size types

Predefined sizes

The avatar component is available in a set of predefined sizes to ensure a consistent appearance across the user interface.

Five avatars, ascending in size from XS to XL showing user photo

Predefined sizes: XS, S, M, L, XL

The table below outlines when to use each avatar size.

<div> <div>Size</div> <div>Use In</div> </div> <div> <div><strong>XS</strong></div> <div>Table list items, card list items</div> </div> <div> <div><strong>S</strong></div> <div>Card headers, card list items</div> </div> <div> <div><strong>M</strong></div> <div>App headers for small screen sizes</div> </div> <div> <div><strong>L</strong></div> <div>App headers for normal screen sizes</div> </div> <div> <div><strong>XL</strong></div> <div>App headers for large screen sizes</div> </div>

Custom sizes

If your use case requires it, you can also set a custom size.

When using a custom avatar size with initials or icons:

Example: If your avatar is 5.5 rem (between sizes L and XL), use the font size for size L (2 rem).

Scale types

You can specify how the original image fits into the avatar:

Scale types: cover crops image (A), contain shows full image with background (B)

Avatar scale types: cover scale type (A) and contain scale type (B)

States

Component states

The avatar component supports three component states: enabled, disabled, and hidden.

Enabled avatar with initials 'SD' (A), disabled avatar with faded user photo (B)

Avatar component states: enabled (A) and disabled (B)

For more information, see Component States.

Interaction states

The avatar component supports four interaction states: regular, hover, down, and down-hover.

A: Regular
B: Hover
C: Down: This state is sometimes described as an “active” or “active/toggled” state.
D: Down-Hover: A combination of the down and hover states.

Interaction states: regular (A), hover (B), down (C), down hover (D)

Avatar interaction states

For more information, see Interaction States.

:badge, info, large, _, SAPUI5 only:

The SAPUI5 avatar component also supports an active/toggled state, which inherits the styling of the standard button. The active/toggled state changes the visual appearance of the avatar even if the focus is changed to another component.

Active and toggled avatar with open menu showing Settings, Legal and About options.

Avatar active/toggled state

Value states

Badges on avatars can display value states to indicate status. Each state uses a distinct color and icon to help users quickly understand the context:

A: Negative: Indicates an error or issue that requires attention or resolution.
B: Critical: Signals a warning or something that needs caution or a follow-up action.
C: Positive: Shows success or confirmation that an action has been completed.
D: Information: Provides neutral information or context without implying an issue.
E: None: No value state is shown. When the avatar has no image, the badge can display a camera icon to prompt the user to change a picture.

Circular avatars in different states: negative with a red “x”, critical with a yellow exclamation mark, positive with a green check mark, information with a blue “i” and none with a blue camera badge.

Badge value states

For more information, see Value States.

Behavior and Interaction

Focus

After a user clicks an interactive avatar, it receives focus. The pressed state is active while the mouse button is down.

Mouse interaction: hover, press and release for initials and user photo avatars

Avatar mouse interaction – hover, press or click

Fallback icon

You can set a fallback icon to appear when the avatar can’t display its intended content. This icon shows up automatically in cases where the image source is incorrect or unavailable, or when the avatar is too small to display the initials properly.

Fallback icons: product placeholder (A), person (B), custom icon (calendar) (C)

Fallback icon with product icon (A), person icon (B), and custom fallback icon (C)

Tooltip :badge, info, large, _, SAPUI5 only:

When adding a badge to the avatar component, always pair it with a tooltip that explains the action. This ensures users understand its purpose and avoids any confusion.

The badge’s tooltip is displayed when the user hovers the mouse pointer over the badge.

When using interactive avatars, always include both a tooltip and an alternative text to support screen reader users.

A two-part illustration demonstrating a tooltip appearing when a user hovers over a badge on an avatar. The left side shows an avatar with an edit badge and a mouse cursor positioned near it. The right side shows the same avatar and badge, but the mouse cursor is now hovering directly over the badge, causing a gray "Tooltip text" box to appear beneath it.

Interactive avatar with a tooltip

Responsiveness

The avatar adapts to different layouts using five predefined sizes optimized for each device type.

Use the predefined sizes to match the surrounding layout density – from compact table items to spacious app headers – ensuring a consistent visual rhythm across your application.

For a full overview of available sizes and their recommended use cases, see Size Types.

Accessibility

SAP follows international standards, such as WCAG and WAI-ARIA, and strives to make our business solutions accessible and inclusive.

For more information, see Accessibility in SAP Fiori and the Accessibility Design Tools Handbook.

Keyboard navigation

The following keyboard combinations are supported by the SAPUI5 Avatar component.

<div> <div>Key Combination</div> <div>What it Does</div> </div> <div> <div><strong>Tab</strong></div> <div>Forward navigation. If an element is interactive, it is focused.</div> </div> <div> <div><strong>Shift + Tab</strong></div> <div>Backward navigation.</div> </div> <div> <div><strong>Enter/ Return</strong> or <strong>Spacebar</strong> or screen tap gesture</div> <div>Triggers the corresponding event if available.</div> </div> <div> <div><strong>Shift + F10</strong></div> <div>Opens the context menu with all actions relevant to the focused element.</div> </div>

Screen reader support

Provide concise alt text that describes what the avatar represents.

Add clear alternative text to every avatar image so it’s announced by screen readers and shown when the image isn’t available or can’t be displayed.

When the avatar is just used for decorative purpose (e.g avatar username is displayed in text beside the avatar), the aria role for the avatar should be ‘presentation’ so that it’s ignored by accessibility tools to avoid repetitive information for screen reader user.

For an interactive avatar or badge, provide a tooltip and an alternative text to indicate the available action.

For details on screen reader support and Accessible Rich Internet Applications (ARIA), see UI5 Screen Reader Support and WAI-ARIA Authoring.

Content

Localization

Initials

Some languages don’t build on an alphabet, or don’t use initials at all. In such cases, the gender-neutral person icon is displayed instead.

Reading direction

For right-to-left languages, such as Arabic or Hebrew, the position of the avatar badge is mirrored. This way, badge placement aligns naturally with the reading direction.

Badge placement: bottom-right in LTR avatars

Left-to-right avatar badges

Badge placement: bottom-left in RTL avatars

Right-to-left avatar badges

Framework Comparison

Some behaviors differ between frameworks due to implementation specifics. The table below summarizes the differences between SAPUI5 and SAP Web Components and lists the framework-specific patterns.

<div> <div data-valign="middle">Feature</div> <div data-valign="middle">SAPUI5</div> <div data-valign="middle">SAP Web Components</div> </div> <div> <div data-valign="middle">The avatar’s <strong>active/toggled</strong> state adopts the standard button styling and remains visible even when it loses focus. For more information, see the <a href="https%3A%2F%2Fwww.sap.com%2Fdesign-system%2Ffiori-design-web%2Fui-elements%2Favatar%2F%23interaction-types">Interaction Types</a> section.</div> <div>Available</div> <div data-valign="middle">Not Available</div> </div> <div> <div data-valign="middle"><strong>Tooltip</strong> explanations for avatar badges clarify the badge’s action and reduce user confusion. For more information, see the <a href="https%3A%2F%2Fwww.sap.com%2Fdesign-system%2Ffiori-design-web%2Fui-elements%2Favatar%2F%23tooltip">Tooltip</a> section.</div> <div>Available</div> <div data-valign="middle">In Progress</div> </div>

[internal_only] To request one of these features for SAP Web Components, submit an InnerSource request. [/internal_only]

Guidelines

Components
Image
Carousel

Implementation

SAPUI5
Avatar (sample)
Avatar (API reference)

SAP Web Components
Avatar

Specifications

Avatar (visual design)

SAP Web UI Kit

Avatar

Guidelines

Components
Image
Carousel

Implementation

SAPUI5
Avatar (sample)
Avatar (API reference)

SAP Web Components
Avatar

UI Kit (Figma)

SAP Fiori for Web UI Kit / Avatar