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 |
|
Sets the ID that represents the local user. | |
authorMessageSettings |
|
Sets the settings for the author's messages. | |
enableFileSelect |
|
|
Sets the File Select settings. |
enableSpeechToText |
|
|
Sets the Speech to Text button settings. |
fileActions |
|
|
Sets the actions that display 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 |
|
Sets the actions that display 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 | |
messageFilesLayout |
|
|
Sets the layout of the files in the message bubble. |
messages |
|
Sets the Chat messages.
Accepts an array of | |
messageToolbarActions |
|
|
Sets the actions of the message toolbar. These actions display in the message toolbar and let you perform specific operations on the message. |
messageWidthMode |
|
|
Controls 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 types to the expected | |
placeholder |
|
Sets the placeholder text for the message input box. | |
quickActionsLayout |
|
|
Sets the layout of the quick actions suggested below the messages. |
receiverMessageSettings |
|
Sets the settings for the receivers' messages. | |
sendButtonSettings |
|
|
Sets the send button settings for the Chat component. Allows customization of the send button appearance, icons and disabled state. |
showAvatar |
|
|
Controls the avatar visibility for the messages.
When set to |
showUsername |
|
|
Controls the visibility of usernames in messages.
When set to |
suggestions |
|
|
Sets the suggestions that 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. |
suggestionsLayout |
|
|
Sets the layout of the suggestions above the message input box. |
timestampVisibility |
|
|
Controls the visibility of timestamps in messages. |
width |
|
Sets the width of the Chat component.
Accepts a string with CSS units (for example, |
Fields
| Name | Type | Default | Description |
|---|---|---|---|
defaultContextMenuActions |
|
|
Sets the default actions that display in the message context menu. |
defaultFileActions |
|
|
Sets the default actions that display in the file actions DropDownButton. |
Events
| Name | Type | Description |
|---|---|---|
contextMenuActionClick |
|
Fires when the user clicks an action in the message context menu. |
download |
|
Fires when the user clicks an action in the file context menu. |
executeAction |
|
Fires when the user clicks a quick action button.
The Chat internally handles known actions such as The event is preventable. Calling |
fileActionClick |
|
Fires when the user clicks an action in the file context menu. |
fileRemove |
|
Fires when the user removes a file from the message input box. |
fileSelect |
|
Fires when the user selects a file in the message input box. |
inputValueChange |
|
Fires when the user types in the message input box. |
sendMessage |
|
Fires when the user sends a message by clicking the Send button or pressing Enter. The message is not automatically added to the |
suggestionExecute |
|
Fires when the user clicks a suggestion in the message input box. |
toolbarActionClick |
|
Fires when the user clicks a quick action button in the message toolbar. |
unpin |
|
Fires when the user unpins the pinned message. This event triggers when the user clicks the delete button on the pinned message. |