# Attachment Type documentation

## TypeScript declaration

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

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

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

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