# SiUserMessageComponent documentation

**Kind:** component

**Selector:** `si-user-message`

```
import { SiUserMessageComponent } from '@siemens/element-ng/chat-messages';
```

User message component for displaying the user's messages in conversational interfaces.

The user message component renders user-submitted content in (AI) chat interfaces, supporting text, attachments, and contextual actions. It appears as a text bubble aligned to the right side. Can be used within [SiChatContainerComponent](<../SiChatContainerComponent/index.html#SiChatContainerComponent>).

The component automatically handles:

• Styling for user messages distinct from AI or generic chat messages

• Displaying attachments above the message bubble

• Displaying primary and secondary actions

See: [SiChatMessageComponent](<../SiChatMessageComponent/index.html#SiChatMessageComponent>) for the base message wrapper component

See: [SiAiMessageComponent](<../SiAiMessageComponent/index.html#SiAiMessageComponent>) for the AI message component

See: [SiAttachmentListComponent](<../SiAttachmentListComponent/index.html#SiAttachmentListComponent>) for the base attachment component

See: [SiChatContainerComponent](<../SiChatContainerComponent/index.html#SiChatContainerComponent>) for the chat container to use this within

```
component SiUserMessageComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [actionParam](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-user-message.component.ts#L72-L72>) | `any` |  | Parameter to pass to action handlers |
| [actions](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-user-message.component.ts#L57-L57>) | `MenuItemAction[]` | `[]` | Primary message actions (edit, delete, copy, etc.). All actions displayed inline |
| [attachments](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-user-message.component.ts#L69-L69>) | `Attachment[]` | `[]` | List of attachments included with this message |
| [content](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-user-message.component.ts#L50-L50>) | `string` | `''` | The user message content |
| [secondaryActions](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-user-message.component.ts#L63-L63>) | `MenuItemAction[]` | `[]` | Secondary actions available in dropdown menu, first use primary actions and only add secondary actions additionally |
| [secondaryActionsLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-user-message.component.ts#L82-L84>) | `TranslatableString` | `` $localize`:@@SI_USER_MESSAGE.SECONDARY_ACTIONS:Additional actions` `` | More actions button aria label |

### Types Documentation

### [Attachment](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-attachment-list.component.ts#L20-L25>)

**Kind:** interface

```
import type { Attachment } from '@siemens/element-ng/chat-messages';
```

Attachment item interface for file attachments in chat messages, used by [SiAttachmentListComponent](<../SiAttachmentListComponent/index.html#SiAttachmentListComponent>) and inside [SiUserMessageComponent](<index.html#SiUserMessageComponent>) as well as [SiChatInputComponent](<../SiChatInputComponent/index.html#SiChatInputComponent>).

See: [SiAttachmentListComponent](<../SiAttachmentListComponent/index.html#SiAttachmentListComponent>) for the attachment list component

See: [SiUserMessageComponent](<index.html#SiUserMessageComponent>) for the user message

See: [SiChatInputComponent](<../SiChatInputComponent/index.html#SiChatInputComponent>) for the chat input component

```
interface Attachment
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-attachment-list.component.ts#L22-L22>) | `string` | File name |
| [previewTemplate](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-attachment-list.component.ts#L24-L24>) (optional) | `TemplateRef<any> \| (() => TemplateRef<any>)` | Optionally show a preview of the attachment by providing a template that is shown in a modal when clicked (optional) |

### [MenuItemAction](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L34-L41>)

**Kind:** interface

```
import type { MenuItemAction } from '@siemens/element-ng/menu';
```

```
interface MenuItemAction extends MenuItemBase
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [action](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L40-L40>) | `string \| ((actionParam: any, source: MenuItemAction) => void)` | Action that called when the item is triggered. A function will be called, a string will be dispatched to the [SiMenuActionService](<../../types/SiMenuActionService/index.html#t:SiMenuActionService>). |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L21-L21>) (optional, inherited) | `string \| number` | Badge that is rendered after the label.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [badgeColor](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L23-L23>) (optional, inherited) | `string` | Color of the badge (not iconBadge).<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L25-L25>) (optional, inherited) | `boolean` | Whether the menu item id disabled.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L14-L14>) (optional, inherited) | `string` | Optional icon that will be rendered before the label.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [iconBadge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L19-L19>) (optional, inherited) | `string \| number \| boolean` | Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L10-L10>) (optional, inherited) | `string` | ID that will be attached to the DOM node.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L12-L12>) (inherited) | `TranslatableString` | Label that is shown to the user.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L35-L35>) | `"action"` |  |

### [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
```

### [MenuItemBase](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L8-L26>)

**Kind:** interface

```
import type { MenuItemBase } from '@siemens/element-ng/menu';
```

```
interface MenuItemBase
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L21-L21>) (optional) | `string \| number` | Badge that is rendered after the label. |
| [badgeColor](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L23-L23>) (optional) | `string` | Color of the badge (not iconBadge). |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L25-L25>) (optional) | `boolean` | Whether the menu item id disabled. |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L14-L14>) (optional) | `string` | Optional icon that will be rendered before the label. |
| [iconBadge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L19-L19>) (optional) | `string \| number \| boolean` | Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered. |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L10-L10>) (optional) | `string` | ID that will be attached to the DOM node. |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L12-L12>) | `TranslatableString` | Label that is shown to the user. |
