Message ToolsPremium
The KendoReact Chat provides message tools that enable users to perform various actions on messages such as copy, reply, delete, and pin.
The Chat component supports two types of message tools:
- Context Menu—Right-click actions available on any message
- Toolbar Tools—Button actions displayed under each message
The message toolbar functionality introduced in v12.0.0 provides enhanced message-level actions and differs from the previous Chat toolbar implementation.
Context Menu
The context menu actions are specific message actions that are available when a user right-clicks any message in the Chat.
Upon right-clicking a message, the context menu displays the available actions, allowing users to quickly perform the desired action without navigating away from the chat interface.
The default actions are Copy and Reply. However, you can extend them and add any other custom actions like Delete, Pin, Forward, and others by setting the messageContextMenuActions
property of the Chat to a MessageAction array. This provides a way to customize the user experience and add functionality that is specific to your application.
Upon selecting an action from the context menu, the onContextMenuAction
event is triggered, returning the selected MessageAction
as an argument, allowing you to handle the action accordingly.
Toolbar Tools
The message toolbar actions are displayed as a set of buttons under each message. They provide quick access to common actions that can be performed on the message such as copy, forward, download, and others.
To customize the message toolbar actions, set the messageToolbarActions
property of the Chat to a MessageAction
array.
Upon clicking any of the toolbar action buttons, the onToolbarAction
event is triggered, returning the selected MessageAction
as an argument. This allows you to handle the action accordingly.