Skip to content

SiChatMessageComponent documentation

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 and SiAiMessageComponent. Can be used within 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 for user message display

See: SiAiMessageComponent for AI message display

See: SiAttachmentListComponent for attachment list to slot in

See: SiChatMessageActionDirective for action buttons to slot in

See: SiChatContainerComponent for the chat container to use this within

Input Properties

NameTypeDefaultDescription
actionsPosition
"side" | "bottom" 'side'

Where to display action buttons (if any)

alignment
"start" | "end" 'start'

Alignment of the message

loading
boolean false

Whether the message is currently loading


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