Skip to content

SiAttachmentListComponent documentation

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

Attachment list component for displaying file attachments in chat messages.

This component renders a list of file attachments with icons, names, and optional preview and remove functionality. It's designed to work with chat message components to show files that have been uploaded or shared in conversations.

This component provides:

• A list of pills showing each attachment's name and an icon

• Optional preview modal for attachments

• Optional remove functionality for editable messages

The component is included within SiUserMessageComponent, SiAiMessageComponent and SiChatInputComponent but can also be used inside custom chat messages with SiChatMessageComponent

See: SiUserMessageComponent for user message display

See: SiAiMessageComponent for AI message display

See: SiChatMessageComponent for custom chat message display

See: SiChatInputComponent for chat input with attachment support

See: Attachment for attachment data structure

Input Properties

Name Type Default Description
alignment
"start" | "end" 'start'

Whether to align attachments to the end (right) or start (left)

attachments
Attachment[] []

List of attachments to display

removable
boolean false

Whether to show remove buttons on attachments

removeLabel
TranslatableString $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove {{attachment}}`

Label for remove attachment button. The attachment name is available with {{attachment}}.

Output Properties

Name Type Description
remove
Attachment

Emitted when an attachment should be removed

Types Documentation

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

Attachment item interface for file attachments in chat messages, used by SiAttachmentListComponent and inside SiUserMessageComponent as well as SiChatInputComponent.

See: SiAttachmentListComponent for the attachment list component

See: SiUserMessageComponent for the user message

See: SiChatInputComponent for the chat input component

Properties

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.


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