# SiAttachmentListComponent documentation

**Kind:** component

**Selector:** `si-attachment-list`

```
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](<../SiUserMessageComponent/index.html#SiUserMessageComponent>), [SiAiMessageComponent](<../SiAiMessageComponent/index.html#SiAiMessageComponent>) and [SiChatInputComponent](<../SiChatInputComponent/index.html#SiChatInputComponent>) but can also be used inside custom chat messages with [SiChatMessageComponent](<../SiChatMessageComponent/index.html#SiChatMessageComponent>)

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

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

See: [SiChatMessageComponent](<../SiChatMessageComponent/index.html#SiChatMessageComponent>) for custom chat message display

See: [SiChatInputComponent](<../SiChatInputComponent/index.html#SiChatInputComponent>) for chat input with attachment support

See: [Attachment](<index.html#t:Attachment>) for attachment data structure

```
component SiAttachmentListComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [alignment](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-attachment-list.component.ts#L69-L69>) | `"start" \| "end"` | `'start'` | Whether to align attachments to the end (right) or start (left) |
| [attachments](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-attachment-list.component.ts#L63-L63>) | `Attachment[]` | `[]` | List of attachments to display |
| [removable](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-attachment-list.component.ts#L75-L75>) | `boolean` | `false` | Whether to show remove buttons on attachments |
| [removeLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-attachment-list.component.ts#L86-L88>) | `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](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-attachment-list.component.ts#L93-L93>) | `Attachment` | Emitted when an attachment should be removed |

### 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](<index.html#SiAttachmentListComponent>) and inside [SiUserMessageComponent](<../SiUserMessageComponent/index.html#SiUserMessageComponent>) as well as [SiChatInputComponent](<../SiChatInputComponent/index.html#SiChatInputComponent>).

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

See: [SiUserMessageComponent](<../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) |

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