# SiChatMessageComponent documentation

**Kind:** component

**Selector:** `si-chat-message`

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

Base declarative chat message component that provides the layout structure for chat messages.

This component handles the core message layout including avatar positioning, loading states, and action button as well as attachment list placement. It serves as the foundation for more specialized message components like [SiUserMessageComponent](<../SiUserMessageComponent/index.html#SiUserMessageComponent>) and [SiAiMessageComponent](<../SiAiMessageComponent/index.html#SiAiMessageComponent>). Can be used within [SiChatContainerComponent](<../SiChatContainerComponent/index.html#SiChatContainerComponent>).

The component provides:

• Flexible alignment (start/end) for different message types

• Avatar/icon slot for message attribution

• Loading state with skeleton UI

• Action buttons positioned on the side or bottom

• Attachment list display slot

• Responsive behavior that adapts to container size

This is a low-level component designed for slotting in custom content, it provides slots via content projection:

• Default content: Main message content area (consider using `si-markdown` for markdown support)

• `si-avatar/si-icon/img` selector: Avatar or icon representing the message sender

• `si-chat-message-action` selector: Action buttons related to the message

• `si-attachment-list` selector: Attachment list component for displaying file attachments

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

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

See: [SiAttachmentListComponent](<../SiAttachmentListComponent/index.html#SiAttachmentListComponent>) for attachment list to slot in

See: [SiChatMessageActionDirective](<../../directives/SiChatMessageActionDirective/index.html#SiChatMessageActionDirective>) for action buttons to slot in

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

```
component SiChatMessageComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [actionsPosition](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-message.component.ts#L64-L64>) | `"side" \| "bottom"` | `'side'` | Where to display action buttons (if any) |
| [alignment](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-message.component.ts#L58-L58>) | `"start" \| "end"` | `'start'` | Alignment of the message |
| [loading](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-message.component.ts#L52-L52>) | `boolean` | `false` | Whether the message is currently loading |
