Skip to content

SiChatContainerComponent documentation

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

A declarative container component for displaying a chat interface with automatic scroll-to-bottom behavior.

This component provides the layout and styling for a chat interface, managing scrolling behavior to keep the newest messages visible while respecting user scrolling actions. It automatically scrolls to the bottom when new content is added, unless the user has scrolled up to view older messages.

Use via content projection:

• Default content: Chat messages displayed in the scrollable messages container or a welcome screen (empty state).

• si-inline-notification selector: Notification component displayed above the input area

• si-chat-input or [siChatContainerInput] selector: Input controls for composing messages

See: SiChatInputComponent for the chat input wrapper component

See: SiChatContainerInputDirective for other input controls to slot in

See: SiAiMessageComponent for AI messages to slot in

See: SiUserMessageComponent for user messages (in AI chats) to slot in

See: SiChatMessageComponent for the chat message wrapper component to slot in other messages

Input Properties

NameTypeDefaultDescription
colorVariant
string 'base-0'

The color variant to apply to the container.

noAutoScroll
boolean false

Disables automatic scrolling to the bottom when new content is added.

Attributes and Methods

NameTypeDescription
focus()
() => void

Focuses the messages container element.

scrollToBottom()
() => void

Scrolls to the bottom of the messages container immediately. This method forces a scroll even if the user has scrolled up.

scrollToTop()
() => void

Scrolls to the top of the messages container immediately.


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