New to Telerik UI for ASP.NET MVCStart a free 30-day trial

ASP.NET MVC Chat Overview

Starting with version 2025.3.825, the Chat component has been completely redesigned. The API is updated accordingly to support the newly introduced features.

The Telerik UI Chat HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI Chat widget.

The Chat component delivers a modern conversational interface designed to enhance user interaction and communication within web applications. It facilitates seamless communication between users, chatbots, and AI-powered systems through an intuitive and highly customizable interface. The component offers extensive functionality, including message threading, file attachments, user avatars, quick action suggestions, and comprehensive accessibility support. Built with flexibility in mind, it enables easy integration with various messaging services, machine learning models, and custom business workflows to meet diverse application requirements.

Initializing the Chat

The following example demonstrates how to define a Chat.

Razor
    @(Html.Kendo().Chat()
        // The name of the Chat is mandatory.
        // It specifies the "id" and the "name" attributes of the widget.
        .Name("chat")
        .Height("600px")
        .Width("400px")
        .AuthorId("1")
    )

Basic Configuration

The following example demonstrates how to define header items, predefined suggestions, and configure attachments and message actions.

Razor
@(Html.Kendo().Chat()
    .Name("chat")
    .HeaderItems(items => {
        items.Add().Type(AppBarItemType.ContentItem).Template("<strong>Customer Support Chat</strong>");
        items.Add().Type(AppBarItemType.Spacer);
        items.Add().Type(AppBarItemType.ContentItem).Template("<button>Export</button>");
    })
    .FileActions(actions =>
    {
        actions.Add().Name("download").Text("Download").Icon("download");
    })
    .MessageToolbarActions(actions =>
    {
        actions.Add().Name("settings").Icon("gear");
        actions.Add().Name("share").Icon("share");
    })
    .MessageActions(actions =>
    {
        actions.Add().Name("copy").Text("Copy").Icon("copy");
        actions.Add().Name("pin").Text("Pin").Icon("pin");
        actions.Add().Name("delete").Text("Delete").Icon("trash");
    })
    .Suggestions(suggestions => {
        suggestions.Add().Text("Analyse a file");
        suggestions.Add().Text("Generate a cover letter");
    })
)

Functionality and Features

FeatureDescription
Data BindingBind the Chat either to a local data collection or to data retrieved from a remote endpoint.
AI IntegrationConfigure the Chat to interact with a large language model through a streaming AI chat service.
ToolsUtilize the available context menu actions and toolbar commands.
File Uploads and MediaEnable file uploads, media sharing, and speech-to-text functionality of the Chat component.
Quick ActionsDefine quick response suggestions that appear above the message box.
TemplatesUse template options to customize the rendering of the messages, attachments, quick actions, and more.
Peer-to-Peer ChatCreate a peer-to-peer Chat application using SignalR.
EventsSubscribe to the available client-side events to implement any custom logic.
AccessibilityThe Chat is accessible for screen readers, supports WAI-ARIA attributes, and delivers keyboard shortcuts for faster navigation.

Next Steps

See Also