# Message Templates

The Chat component allows you to customize the appearance and content of messages through various template options, providing full control over how messages are rendered.

You can implement the following message template customizations:

* [Custom Message Templates](https://www.telerik.com/kendo-react-ui-develop/components/conversationalui/chat/customization/message-templates#custom-message-templates)—Create custom React components to control message appearance and layout
* [Adding Images to Messages](https://www.telerik.com/kendo-react-ui-develop/components/conversationalui/chat/customization/message-templates#adding-images-to-messages)—Display images alongside text content using custom message templates
* [Displaying Markdown Content](https://www.telerik.com/kendo-react-ui-develop/components/conversationalui/chat/customization/message-templates#displaying-markdown-content)—Render Markdown content within messages using external libraries

## Custom Message Templates

The Chat allows you to customize the appearance of messages through the [`messageTemplate`](https://www.telerik.com/kendo-react-ui-develop/components/conversationalui/api/chatprops#messagetemplate) property. This template replaces the entire message rendering, giving you complete control over the message structure.

> Using `messageTemplate` overrides the entire message rendering and removes built-in functionalities such as message collapse, and timestamps. If you want to customize only the message content while preserving these features, use [`messageContentTemplate`](https://www.telerik.com/kendo-react-ui-develop/components/conversationalui/chat/customization/message-content-templates) instead.

To set a custom message template, create a React component and assign it to the `messageTemplate` property of the Chat component.

[Demo Source](https://demos.telerik.com/kendo-react-ui/conversational-ui/chat/customization/message-templates/source.txt)

## Adding Images to Messages

The following example demonstrates how to create custom message templates that can display images alongside text content. This approach gives you full control over image rendering, including sizing, positioning, and layout.

[Demo Source](https://demos.telerik.com/kendo-react-ui/conversational-ui/chat/customization/message-templates-images/source.txt)

## Displaying Markdown Content

The following example demonstrates how to render Markdown by utilizing the marked library.

[Demo Source](https://demos.telerik.com/kendo-react-ui/conversational-ui/chat/customization/markdown-messages/source.txt)

## Suggested Links

* [Message Content Templates](https://www.telerik.com/kendo-react-ui-develop/components/conversationalui/chat/customization/message-content-templates)
* [Attachment Templates](https://www.telerik.com/kendo-react-ui-develop/components/conversationalui/chat/customization/attachment-templates)
* [Header Templates](https://www.telerik.com/kendo-react-ui-develop/components/conversationalui/chat/customization/header-templates)
* [Chat API Reference](https://www.telerik.com/kendo-react-ui-develop/components/conversationalui/api)
