New to Kendo UI for Angular? Start a free 30-day trial
Message Attachments
The Chat messages can contain attachments such as images, videos, or other data.
Supported Attachment Types
The Chat provides built-in support for displaying:
- Images—The
contentType
has to start with"image/"
.content
has to be a valid URL. - Plain-text attachments—The built-in Chat template displays any content, other than images, as text.
Defining Attachments
To define attachments for a message:
- Populate the
attachments
field of the message. - Set the
content
and an optionalcontentType
for each Attachment. Typically, thecontent
type identifier for the attachment isMIME
, but you can also use a string.
Display Modes
By default, message attachments are displayed as a carousel or card deck below the message. You can also display attachments in a list by setting the attachmentLayout
of the message.
Change Theme
Theme
Loading ...
Attachment Templates
To customize the attachments, define an AttachmentTemplate
. To get the default appearance of the built-in attachment template, wrap the template content in a "k-card"
container.
Change Theme
Theme
Loading ...