ChatComponent
Represents the Kendo UI Chat component for Angular.
Provides a conversational UI for chat-based applications. Supports message templates, attachments, localization, and user actions.
<kendo-chat
[messages]="messages"
[authorId]="authorId"
(sendMessage)="onSendMessage($event)"
(executeAction)="onExecuteAction($event)">
</kendo-chat>
Selector
kendo-chat
Inputs
Name | Type | Default | Description |
---|---|---|---|
allowMessageCollapse |
|
|
Enables the expand or collapse functionality for messages. |
authorId |
|
Specifies the id representing the local user. | |
enableFileSelect |
|
|
Sets the File Select settings. |
enableSpeechToText |
|
|
Sets the Speech to Text button settings. |
fileActions |
|
|
Specifies the actions available in the file as items of a DropDownButton.
These actions display when you click the file DropDownButton and let you perform specific operations on the file.
The default action is |
height |
|
Sets the height of the Chat component.
Accepts a string with CSS units (for example, | |
inputValue |
|
|
Sets the value of the Message Box. |
messageContextMenuActions |
|
Specifies the actions available in the message as a context menu.
These actions display as menu items and let you perform specific operations on the message.
The default actions are | |
messages |
|
Defines the array of messages displayed in the Chat. Each message can include a timestamp for unique identification. For more information, see ngFor - Change Tracking. | |
messageToolbarActions |
|
|
Specifies the actions available in the message toolbar. These actions display in the message toolbar and let you perform specific operations on the message. |
messageToolbarVisibility |
|
|
Sets the visibility of the message toolbar. |
messageWidthMode |
|
|
Switches the width of the message between the predefined options. |
modelFields |
|
Sets the names of the model fields from which the Chat reads its data.
Lets you map custom data structures to the expected | |
placeholder |
|
Sets the placeholder text for the message input box. | |
sendButtonSettings |
|
|
Sets the send button settings for the Chat component. Allows customization of the send button appearance, icons and disabled state. |
suggestions |
|
|
Sets the suggestions to display in the message input box. Suggestions display as a list of clickable items that let you quickly insert predefined text into the message input. |
width |
|
Sets the width of the Chat component.
Accepts a string with CSS units (for example, |
Fields
Name | Type | Default | Description |
---|---|---|---|
defaultContextMenuActions |
|
|
Specifies the default actions available in the message context menu. |
defaultFileActions |
|
Specifies the default actions available in the file actions DropDownButton. |
Events
Name | Type | Description |
---|---|---|
contextMenuActionClick |
|
Emits when the user clicks an action in the message context menu. |
download |
|
Emits when the user clicks an action in the file context menu. |
executeAction |
|
Emits when the user clicks a quick action button.
The Chat internally handles known actions such as The event is preventable. Calling |
fileActionClick |
|
Emits when the user clicks an action in the file context menu. |
fileRemove |
|
Emits when the user removes a file from the message input box. |
fileSelect |
|
Emits when the user selects a file in the message input box. |
inputValueChange |
|
Emits when the user types in the message input box. |
sendMessage |
|
Emits when the user sends a message by clicking the Send button or pressing Enter. The message is not automatically added to the |
suggestionExecute |
|
Emits when the user clicks a suggestion in the message input box. |
toolbarActionClick |
|
Emits when the user clicks a quick action button in the message toolbar. |
unpin |
|
Emits when the user unpins the pinned message. This event triggers when the user clicks the delete button on the pinned message. |