# SiAvatarComponent documentation

**Kind:** component

**Selector:** `si-avatar`

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

```
component SiAvatarComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [altText](<https://github.com/siemens/element/blob/main/projects/element-ng/avatar/si-avatar.component.ts#L56-L56>) (required) | `string` |  | The `alt` text for image, `title` for other modes. |
| [autoColor](<https://github.com/siemens/element/blob/main/projects/element-ng/avatar/si-avatar-background-color.directive.ts#L44-L44>) | `boolean` | `false` | Automatically calculates the background color. If set, [color](<index.html#SiAvatarComponent.color>) will be ignored. |
| [color](<https://github.com/siemens/element/blob/main/projects/element-ng/avatar/si-avatar.component.ts#L54-L54>) | `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](<index.html#SiAvatarComponent.autoColor>) to `true`. |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/avatar/si-avatar.component.ts#L40-L40>) | `string \| undefined` |  | Icon name when using an icon. |
| [imageUrl](<https://github.com/siemens/element/blob/main/projects/element-ng/avatar/si-avatar.component.ts#L38-L38>) | `string \| undefined` |  | Image src URL when using an image. |
| [initials](<https://github.com/siemens/element/blob/main/projects/element-ng/avatar/si-avatar.component.ts#L46-L46>) | `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](<https://github.com/siemens/element/blob/main/projects/element-ng/avatar/si-avatar.component.ts#L36-L36>) | `AvatarSize` | `'regular'` | Size of the component. |
| [status](<https://github.com/siemens/element/blob/main/projects/element-ng/avatar/si-avatar.component.ts#L61-L61>) | `EntityStatusType \| undefined` |  | The status (success, info, warning, caution, danger, critical, pending, progress) to be visualized. |
| [statusAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/avatar/si-avatar.component.ts#L65-L65>) | `TranslatableString \| undefined` |  | aria-label for status |

### Types Documentation

### [AvatarSize](<https://github.com/siemens/element/blob/main/projects/element-ng/avatar/si-avatar.component.ts#L12-L12>)

**Kind:** type alias

```
import type { AvatarSize } from '@siemens/element-ng/avatar';
```

```
type AvatarSize = 'tiny' | 'xsmall' | 'small' | 'regular' | 'large' | 'xlarge'
```

### [EntityStatusType](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/status-type.model.ts#L9-L9>)

**Kind:** type alias

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

```
type EntityStatusType = ExtendedStatusType | 'pending' | 'progress'
```

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
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.

```
type TranslatableString = string & Translatable
```

### [ExtendedStatusType](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/status-type.model.ts#L8-L8>)

**Kind:** type alias

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

```
type ExtendedStatusType = StatusType | 'unknown'
```

### [StatusType](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/status-type.model.ts#L7-L7>)

**Kind:** type alias

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

```
type StatusType = 'success' | 'info' | 'warning' | 'danger' | 'caution' | 'critical'
```
