# SiChatInputComponent documentation

**Kind:** component

**Selector:** `si-chat-input`

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

Chat input component for composing and sending messages in conversational interfaces.

The chat input component provides a text area for users to compose messages, supporting text, attachments, and contextual actions. It appears as a textarea with buttons for adding attachments and sending messages, as well as an optional disclaimer.

The component automatically handles:

• Styling for chat input and actions.

• Dynamic resizing of the textarea based on content.

• Uploading of and displaying of attachments above the input area.

• Displaying primary and secondary actions.

Additionally to the inputs and outputs documented here, the component supports content projection via the following slots:

• Default content: Custom action buttons to display inline, prefer using the `actions` input for buttons, can be used in addition.

• `siChatInputDisclaimer` selector: Custom disclaimer content to display below the input area, prefer using the `disclaimer` input for simple text disclaimers.

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

See: [SiChatInputDisclaimerDirective](<../../directives/SiChatInputDisclaimerDirective/index.html#SiChatInputDisclaimerDirective>) to slot in custom disclaimer content

```
component SiChatInputComponent implements AfterViewInit
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [accept](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L211-L211>) | `string \| undefined` | `undefined` | Accepted file types for attachments (as accept string) |
| [actionParam](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L235-L235>) | `any` |  | Parameter to pass to action handlers |
| [actions](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L193-L193>) | `MenuItemAction[]` | `[]` | Primary actions available in the input. Provide at most one action. |
| [allowAttachments](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L205-L205>) | `boolean` | `false` | Whether file attachments are supported |
| [attachFileLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L282-L284>) | `TranslatableString` | `` $localize`:@@SI_CHAT_INPUT.ATTACH_FILE:Attach file` `` | Attach file button aria label |
| [attachments](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L223-L223>) | `ChatInputAttachment[]` | `[]` | Current attachments |
| [autoFocus](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L272-L272>) | `boolean` | `false` | Auto-focus the input on component initialization |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L160-L160>) | `boolean` | `false` | Whether the input is disabled |
| [disclaimer](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L187-L187>) | `TranslatableString \| undefined` |  | A disclaimer to display.<br><br>If not provided, the component will look for projected content with the `siChatInputDisclaimer` directive. If both are empty, no disclaimer section will be shown (handled via CSS :empty). |
| [followUpPrompts](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L317-L317>) | `string[]` | `[]` | Suggested follow-up prompts to display as pill buttons above the chat input. Use `followUpPromptSelected` to handle selection and update the input value. Typically populated from AI response data and cleared after selection or on send. |
| [interruptButtonLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L264-L266>) | `TranslatableString` | `` $localize`:@@SI_CHAT_INPUT.INTERRUPT:Stop processing` `` | Interrupt button label |
| [interruptible](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L174-L174>) | `boolean` | `false` | Whether the input supports interrupting ongoing operations. When active, the send button transforms into an interrupt button (with element-stop-filled icon). If sending is true, the interrupt button will be disabled. |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L232-L232>) | `string` | ``t(() => $localize`:@@SI_CHAT_INPUT.LABEL:Chat input`)`` | The label for the input, used for accessibility |
| [maxFileSize](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L217-L217>) | `number` | `10485760 (10MB)` | Maximum file size in bytes |
| [maxLength](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L179-L179>) | `number \| undefined` |  | Maximum number of characters allowed |
| [placeholder](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L152-L154>) | `TranslatableString` | `` $localize`:@@SI_CHAT_INPUT.PLACEHOLDER:Enter a message…` `` | Placeholder text for the input |
| [removeAttachmentLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L295-L297>) | `TranslatableString` | `` $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove {{attachment}}` `` | Remove attachment aria label. The attachment name is available with `{{attachment}}`. |
| [secondaryActions](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L199-L199>) | `MenuItemAction[]` | `[]` | Secondary actions available in dropdown menu |
| [secondaryActionsLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L307-L309>) | `TranslatableString` | `` $localize`:@@SI_CHAT_INPUT.SECONDARY_ACTIONS:Additional actions` `` | More actions button aria label |
| [sendButtonIcon](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L254-L254>) | `string` | `this.icons.elementSendFilled` | Send button icon |
| [sendButtonLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L245-L247>) | `TranslatableString` | `` $localize`:@@SI_CHAT_INPUT.SEND:Send` `` | Send button label |
| [sending](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L166-L166>) | `boolean` | `false` | Whether a message is currently being sent, also prevent the sending of new ones while still allowing the user to type |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L142-L142>) | `string` | `''` | Current input value |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [attachmentsChange](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L223-L223>) | `ChatInputAttachment[]` | Current attachments |
| [fileError](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L341-L341>) | `FileUploadError` | Emitted when file upload errors occur |
| [followUpPromptSelected](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L323-L323>) | `string` | Emitted when the user selects a follow-up prompt. The emitted value is the text of the selected prompt. |
| [interrupt](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L336-L336>) | `void` | Emitted when the user wants to interrupt the current operation |
| [interruptibleChange](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L174-L174>) | `boolean` | Whether the input supports interrupting ongoing operations. When active, the send button transforms into an interrupt button (with element-stop-filled icon). If sending is true, the interrupt button will be disabled. |
| [send](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L328-L331>) | `{ content: string; attachments: ChatInputAttachment[]; }` | Emitted when the user wants to send a message |
| [sendingChange](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L166-L166>) | `boolean` | Whether a message is currently being sent, also prevent the sending of new ones while still allowing the user to type |
| [valueChange](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L142-L142>) | `string` | Current input value |

#### Attributes and Methods

##### focus

[Source for focus](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L506-L511>)

Focus the textarea input

```
focus(): void
```

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### Types Documentation

### [ChatInputAttachment](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L58-L65>)

**Kind:** interface

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

Attachment item interface for file attachments in chat messages, extension of [Attachment](<index.html#t:Attachment>) for [SiAttachmentListComponent](<../SiAttachmentListComponent/index.html#SiAttachmentListComponent>) to use within [SiChatInputComponent](<index.html#SiChatInputComponent>). Adds the action file information. Can be used within [SiChatContainerComponent](<../SiChatContainerComponent/index.html#SiChatContainerComponent>).

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

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

See: [SiChatInputComponent](<index.html#SiChatInputComponent>) for the chat input component

See: [SiChatContainerComponent](<../SiChatContainerComponent/index.html#SiChatContainerComponent>) for the base chat container component where this can be used

See: [SiAiChatComponent](<../SiAiChatComponent/index.html#SiAiChatComponent>) for the AI chat container where this needs to be used

```
interface ChatInputAttachment extends Attachment
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [file](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L60-L60>) | `File` | File object |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-attachment-list.component.ts#L22-L22>) (inherited) | `string` | File name<br><br>Inherited from [Attachment](<index.html#t:Attachment>) |
| [previewTemplate](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-attachment-list.component.ts#L24-L24>) (optional, inherited) | `TemplateRef<any> \| (() => TemplateRef<any>)` | Optionally show a preview of the attachment by providing a template that is shown in a modal when clicked (optional)<br><br>Inherited from [Attachment](<index.html#t:Attachment>) |
| [size](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L62-L62>) | `number` | File size in bytes |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-chat-input.component.ts#L64-L64>) | `string` | MIME type |

### [MenuItemAction](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L34-L41>)

**Kind:** interface

```
import type { MenuItemAction } from '@siemens/element-ng/menu';
```

```
interface MenuItemAction extends MenuItemBase
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [action](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L40-L40>) | `string \| ((actionParam: any, source: MenuItemAction) => void)` | Action that called when the item is triggered. A function will be called, a string will be dispatched to the [SiMenuActionService](<../../types/SiMenuActionService/index.html#t:SiMenuActionService>). |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L21-L21>) (optional, inherited) | `string \| number` | Badge that is rendered after the label.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [badgeColor](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L23-L23>) (optional, inherited) | `string` | Color of the badge (not iconBadge).<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L25-L25>) (optional, inherited) | `boolean` | Whether the menu item id disabled.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L14-L14>) (optional, inherited) | `string` | Optional icon that will be rendered before the label.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [iconBadge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L19-L19>) (optional, inherited) | `string \| number \| boolean` | Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L10-L10>) (optional, inherited) | `string` | ID that will be attached to the DOM node.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L12-L12>) (inherited) | `TranslatableString` | Label that is shown to the user.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L35-L35>) | `"action"` |  |

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

### [FileUploadError](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-upload.directive.ts#L18-L21>)

**Kind:** interface

```
import type { FileUploadError } from '@siemens/element-ng/file-uploader';
```

```
interface FileUploadError extends UploadFile
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [errorParams](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L15-L15>) (optional, inherited) | `Record<string, unknown>` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [errorText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-upload.directive.ts#L20-L20>) | `TranslatableString` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [file](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L11-L11>) (inherited) | `File` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [fileName](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L12-L12>) (inherited) | `string` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [progress](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L16-L16>) (inherited) | `number` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [size](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L13-L13>) (inherited) | `string` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [status](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-upload.directive.ts#L19-L19>) | `"invalid"` | Inherited from [UploadFile](<index.html#t:UploadFile>) |

### [MenuItemBase](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L8-L26>)

**Kind:** interface

```
import type { MenuItemBase } from '@siemens/element-ng/menu';
```

```
interface MenuItemBase
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L21-L21>) (optional) | `string \| number` | Badge that is rendered after the label. |
| [badgeColor](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L23-L23>) (optional) | `string` | Color of the badge (not iconBadge). |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L25-L25>) (optional) | `boolean` | Whether the menu item id disabled. |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L14-L14>) (optional) | `string` | Optional icon that will be rendered before the label. |
| [iconBadge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L19-L19>) (optional) | `string \| number \| boolean` | Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered. |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L10-L10>) (optional) | `string` | ID that will be attached to the DOM node. |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L12-L12>) | `TranslatableString` | Label that is shown to the user. |

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

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

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

See: [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) |

### [UploadFile](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L9-L17>)

**Kind:** interface

```
import type { UploadFile } from '@siemens/element-ng/file-uploader';
```

```
interface UploadFile
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [errorParams](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L15-L15>) (optional) | `Record<string, unknown>` |  |
| [errorText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L14-L14>) (optional) | `TranslatableString` |  |
| [file](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L11-L11>) | `File` |  |
| [fileName](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L12-L12>) | `string` |  |
| [progress](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L16-L16>) | `number` |  |
| [size](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L13-L13>) | `string` |  |
| [status](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L10-L10>) | `"error" \| "success" \| "added" \| "invalid" \| "queued" \| "uploading"` |  |
