Skip to content
Edit this page

SiAvatarComponent documentation

import { SiAvatarComponent } from '@siemens/element-ng/avatar';

Input Properties

Name Type Default Description
altText required
string

The alt text for image, title for other modes.

autoColor
boolean false

Automatically calculates the background color. If set, color will be ignored.

color
number undefined

The desired color index from $si-sys-color-data-categorical-* tokens. This can be set to any kind of positive integer that is then mapped to a color index. A better way to set a pseudo-random color is to set * autoColor to true.

icon
string | undefined

Icon name when using an icon.

imageUrl
string | undefined

Image src URL when using an image.

initials
string | undefined

Initials to be displayed as default avatar if no icon or imageUrl are provided. If also no initials are provided, they will be automatically calculated from the altText. The value will be used to calculate the background color when autoColor is true.

size
AvatarSize 'regular'

Size of the component.

status
EntityStatusType | undefined

The status (success, info, warning, caution, danger, critical, pending, progress) to be visualized.

statusAriaLabel
TranslatableString | undefined

aria-label for status

Types Documentation

AvatarSize

'tiny' | 'xsmall' | 'small' | 'regular' | 'large' | 'xlarge'
type alias
import type { AvatarSize } from '@siemens/element-ng/avatar';

import type { EntityStatusType } from '@siemens/element-ng/common';

import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';

Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit. Equivalent to a normal string in usage and functionality.

import type { ExtendedStatusType } from '@siemens/element-ng/common';

StatusType

'success' | 'info' | 'warning' | 'danger' | 'caution' | 'critical'
type alias
import type { StatusType } from '@siemens/element-ng/common';


Except where otherwise noted, content on this site is licensed under MIT License.