allowMessageCollapseBoolean
(default: false)
Enables or disables message collapsing functionality for expandable messages. When enabled, long messages can be collapsed to save screen space.
Example
<div id="chat"></div>
<script>
let messagesData = [
{
id: 1,
text: "This is a very long message that will be expandable when allowMessageCollapse is enabled. Users can click to expand or collapse it to save space in the chat interface.",
authorId: "user1",
authorName: "John Doe",
authorImageUrl: "https://demos.telerik.com/kendo-ui/content/web/Customers/RICSU.jpg",
timestamp: new Date(2026, 0, 1, 9, 0)
},
{
id: 2,
text: "Short reply",
authorId: "user2",
authorName: "Jane Smith",
authorImageUrl: "https://demos.telerik.com/kendo-ui/content/web/Customers/LONEP.jpg",
timestamp: new Date(2026, 0, 1, 9, 5)
}
];
$("#chat").kendoChat({
allowMessageCollapse: true,
authorId: "user1",
dataSource: messagesData
});
</script>
In this article