Renders an attachment inside the chat. The attachments are rendered through a predefined or custom template, registered with the Chat widget.


options Object

The configuration options for the attachment.

options.attachments Object

An array of attachment objects.

options.attachments.content Object

The attachment properties, passed to the template to be rendered inside the chat bubble.

options.attachments.contentType String

The attachment type. This is used to determine which template is used when rendering the attachment inside the chat.

options.attachmentLayout String

The layout to be used in rendering the attachments. Supported values are list and carousel.

sender Object

The configuration object containg information about the sender of the message bubble. This determines where the message is rendered. Object

The unique identifier, used to distinguish between different users in the chat. String

The string representing the name of the sender, which is rendered before the message bubble.

sender.iconUrl String

The url used to show the sender avatar.

Example - Render attachment

<div id="chat"></div>

    var chat = $("#chat").data("kendoChat");

        attachments: [{
            contentType: "heroCard",
            content: {
                title: "Attachment Title",
                subtitle: "Attachment Subtitle",
                text: "Sample text"
        attachmentLayout: "carousel"
    }, chat.getUser());
In this article
Not finding the help you need? Improve this article