attachmentLayoutFieldString(default: "attachmentLayout")
The field of the message data item that provides the attachment layout mode for that specific message. Allows per-message override of the global attachmentLayout setting.
Example
<div id="chat"></div>
<script>
let messagesData = [
{
id: 1,
text: "Cards with custom layout field:",
authorId: "bot",
authorName: "Bot",
timestamp: new Date(2026, 0, 1, 9, 0),
attachments: [
{ contentType: "card", title: "Item 1" },
{ contentType: "card", title: "Item 2" }
],
cardDisplayMode: "carousel"
}
];
$("#chat").kendoChat({
attachmentLayoutField: "cardDisplayMode",
authorId: "user1",
dataSource: messagesData
});
</script>