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. | |
autoScrollThreshold |
|
|
Sets the minimum distance from the top of the visible message area that prevents auto-scrolling when a new receiver message arrives.
Accepts a percentage string (for example, Has no effect on author messages, which always scroll to the bottom. For more details, refer to the Auto-Scroll Threshold article. |
endIndex |
|
Sets the exclusive end index of the currently loaded batch within the full conversation. Used with remote data sources in endless scroll mode to determine whether more messages exist beyond the current batch. For more details, refer to the Endless Scrolling with Remote Data section in the documentation. | |
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 |
fileSelectButton |
|
|
Sets the File Select Button settings. |
height |
|
Sets the height of the Chat component.
Accepts a string with CSS units (for example, | |
inputValue |
|
|
Sets the value of the Message Box. |
loading |
|
|
Sets the loading state of the Chat component.
When set to |
messageBoxSettings |
|
Sets the message box settings. | |
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 | |
pageSize |
|
|
Sets the number of messages loaded per page in endless scroll mode.
Ignored in |
pinnedMessages |
|
|
Sets the full set of pinned messages in the conversation. Used with remote data sources in endless scroll mode to render the pinned message indicator when the pinned message is outside the currently loaded batch. For more details, refer to the Endless Scrolling with Remote Data section in the documentation. |
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. | |
repliedToMessages |
|
|
Sets the messages that serve as reply targets for messages in the currently loaded batch but exist outside it. Used with remote data sources in endless scroll mode to render reply previews when the replied-to message is not in the current batch. For more details, refer to the Endless Scrolling with Remote Data section in the documentation. |
scrollMode |
|
|
Controls the scrolling behavior of the message list. |
scrollToBottomButton |
|
|
Controls whether a scroll to bottom button is rendered at the bottom of the Chat. Displayed only when the user has scrolled the component upward. |
sendButton |
|
|
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 |
speechToTextButton |
|
|
Sets the Speech to Text button settings. |
startIndex |
|
Sets the index of the first message in the currently loaded batch within the full conversation.
Used with remote data sources in endless scroll mode to compute the range for the next | |
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. |
total |
|
Sets the total number of messages in the conversation when using endless scrolling with remote data source. For more details, refer to the Endless Scrolling with Remote Data section in the documentation. | |
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. |
loadMore |
|
Fires when the user scrolls near the edge of the rendered message window in endless scroll mode. |
referencedMessageClick |
|
Fires when the user clicks a referenced message (pinned indicator or reply preview). |
resendMessage |
|
Fires when the user clicks the resend button on a failed message. |
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. |