ChatBuilder
Defines the fluent API for configuring the Kendo UI Chat
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class ChatBuilder : WidgetBuilderBase<Chat, ChatBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<Chat, ChatBuilder>ChatBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the ChatBuilder class.
Methods
Configures the action button (send/stop button) in the message input area. Allows customization of icons, text labels, and loading state appearance.
public ChatBuilder ActionButton(Action<ChatActionButtonSettingsBuilder> configurator)
The ChatActionButtonSettingsBuilder for the actionbutton setting.
Returns:Returns the current instance of ChatBuilder .
Enables or disables message collapsing functionality for expandable messages. When enabled, long messages can be collapsed to save screen space.
Enables or disables message collapsing functionality for expandable messages. When enabled, long messages can be collapsed to save screen space.
public ChatBuilder AllowMessageCollapse(bool value)
The value for AllowMessageCollapse
Returns:Returns the current ChatBuilder instance.
Sets the default layout mode for rich attachments.
public ChatBuilder AttachmentLayout(ChatAttachmentLayout value)
The value for AttachmentLayout
Returns:Returns the current ChatBuilder instance.
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.
public ChatBuilder AttachmentLayoutField(string value)
The value for AttachmentLayoutField
Returns:Returns the current ChatBuilder instance.
The field of the message data item that provides the rich attachments array. Each attachment object can contain contentType, title, subtitle, thumbnailUrl, and actions properties.
public ChatBuilder AttachmentsField(string value)
The value for AttachmentsField
Returns:Returns the current ChatBuilder instance.
The template used to render individual attachments within messages. Receives the attachment data object and should return an HTML string. When not set, the default attachment rendering is used.The function receives the attachment object with properties such as title, subtitle, image, contentType, and content.
public ChatBuilder AttachmentTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the attachmenttemplate.
Returns:Returns the current ChatBuilder instance.
The template used to render individual attachments within messages. Receives the attachment data object and should return an HTML string. When not set, the default attachment rendering is used.The function receives the attachment object with properties such as title, subtitle, image, contentType, and content.
public ChatBuilder AttachmentTemplateHandler(string templateHandler)
The handler that returs the template for AttachmentTemplate
Returns:Returns the current ChatBuilder instance.
Specifies the unique identifier of the current user. If not set, a GUID will be generated automatically. This determines which messages are displayed as "own messages" (right-aligned) versus "other messages" (left-aligned).
public ChatBuilder AuthorId(string value)
The value for AuthorId
Returns:Returns the current ChatBuilder instance.
Specifies the field name in the data source from which the message author's unique identifier will be read.
public ChatBuilder AuthorIdField(string value)
The value for AuthorIdField
Returns:Returns the current ChatBuilder instance.
Specifies the field name in the data source from which the alt text for the author's avatar image will be read.
public ChatBuilder AuthorImageAltTextField(string value)
The value for AuthorImageAltTextField
Returns:Returns the current ChatBuilder instance.
Specifies the field name in the data source from which the URL for the author's avatar image will be read.
public ChatBuilder AuthorImageUrlField(string value)
The value for AuthorImageUrlField
Returns:Returns the current ChatBuilder instance.
User-specific message settings applied to messages sent by the current user (author). These settings override the global display options like showAvatar, showUsername, and messageWidthMode for author messages only. See also receiverMessageSettings.The object accepts the following properties: showAvatar - Boolean - Whether to show the avatar for author messages.; showUsername - Boolean - Whether to show the username for author messages.; messageWidthMode - String - Message width mode: "standard" or "full".; allowMessageCollapse - Boolean - Whether author messages can be collapsed.; messageTemplate - Function - Template override for author messages. Receives the same arguments as messageTemplate.; messageContentTemplate - Function - Content template override for author messages. Receives the current message object.; enableFileActions - Boolean - Whether file actions are enabled for author messages.; enableContextMenuActions - Boolean - Whether context menu actions are enabled for author messages.; messageToolbarActions - Array - Toolbar actions specific to author messages. or messageActions - Array - Context menu actions specific to author messages..
public ChatBuilder AuthorMessageSettings(Action<ChatMessageSettingsBuilder> configurator)
The ChatMessageSettingsBuilder for the authormessagesettings setting.
Returns:Returns the current instance of ChatBuilder .
Specifies the field name in the data source from which the author's display name will be read.
public ChatBuilder AuthorNameField(string value)
The value for AuthorNameField
Returns:Returns the current ChatBuilder instance.
Enables or disables automatic assignment of a unique ID to each message posted in the chat. When enabled, messages without an explicit ID will be assigned a generated unique identifier.This option should be set to false if the chat is configured to work with a remote data source and the messages are created on the server. In that case, the id should be assigned on the server itself.
public ChatBuilder AutoAssignId(bool value)
The value for AutoAssignId
Returns:Returns the current ChatBuilder instance.
Controls whether the Chat will automatically fetch data from the data source when initialized.When scrollMode is set to "endless" and the dataSource uses serverPaging, autoBind: false is not supported. Remote endless mode always starts with a Chat-managed latest-window request, and manual dataSource.read() and dataSource.fetch() calls are not supported for that mode.
public ChatBuilder AutoBind(bool value)
The value for AutoBind
Returns:Returns the current ChatBuilder instance.
Defines the amount of space that is preserved above a newly auto-scrolled incoming message when the user is already near the bottom of the message list. Accepts either a pixel value or a percentage of the visible message list area.
public ChatBuilder AutoScrollThreshold(double value)
The value for AutoScrollThreshold
Returns:Returns the current ChatBuilder instance.
Binds the component to an IEnumerable collection.
public ChatBuilder BindTo(IEnumerable<ChatMessage> data)
The IEnumerable collection.
Returns:Returns the current ChatBuilder instance.
Sets the DataSource configuration of the Chat for remote data binding.
public ChatBuilder DataSource(Action<DataSourceBuilder<object>> configurator)
The action that configures the DataSource.
Returns:Returns the current ChatBuilder instance.
Sets the DataSource configuration of the Chat for remote data binding.
public ChatBuilder DataSource(string dataSourceId)
The dataSource id that configures the DataSource.
Returns:Returns the current ChatBuilder instance.
Specifies the text direction of the Chat.
public ChatBuilder Dir(TextDirection value)
The value for Dir
Returns:Returns the current ChatBuilder instance.
Specifies the delay in milliseconds before the Chat loads older or newer messages after the user reaches an endless-scroll edge. The delay applies only to endless edge-trigger loading and does not affect the scroll-to-bottom button behavior or separator updates.
public ChatBuilder EndlessScrollDebounceDelay(double value)
The value for EndlessScrollDebounceDelay
Returns:Returns the current ChatBuilder instance.
Configures the client-side events.
public ChatBuilder Events(Action<ChatEventBuilder> configurator)
The client events action.
Returns:Returns the current ChatBuilder instance.
The field of the message data item that provides the failed flag. When true, the message is rendered with a failed state indicator and a retry button.
public ChatBuilder FailedField(string value)
The value for FailedField
Returns:Returns the current ChatBuilder instance.
Defines the collection of actions that will be rendered in the context menu for file attachments. Each action represents an operation that users can perform on files (download, delete, preview, etc.).
public ChatBuilder FileActions(Action<ChatFileActionFactory> configurator)
The ChatFileActionFactory for the fileactions setting.
Returns:Returns the current instance of ChatBuilder .
Configures the file select button (attachment button) in the message input area. Can be set to: true: Shows the button with default settings; false: Hides the button completely (does not render) or Object: Shows the button with custom configuration.
public ChatBuilder FileAttachment(Action<ChatFileAttachmentSettingsBuilder> configurator)
The ChatFileAttachmentSettingsBuilder for the fileattachment setting.
Returns:Returns the current instance of ChatBuilder .
Configures the file select button (attachment button) in the message input area. Can be set to: true: Shows the button with default settings; false: Hides the button completely (does not render) or Object: Shows the button with custom configuration.
public ChatBuilder FileAttachment(bool enabled)
Enables or disables the fileattachment option.
Returns:Returns the current instance of ChatFileAttachmentSettingsBuilder .
Specifies the field name in the data source from which the array of files attached to a message will be read.
public ChatBuilder FilesField(string value)
The value for FilesField
Returns:Returns the current ChatBuilder instance.
Controls the layout mode for file attachments within messages.
public ChatBuilder FilesLayoutMode(ChatFilesLayout value)
The value for FilesLayoutMode
Returns:Returns the current ChatBuilder instance.
The template used to render file attachments in messages.
public ChatBuilder FilesTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the filestemplate.
Returns:Returns the current ChatBuilder instance.
The template used to render file attachments in messages.
public ChatBuilder FilesTemplateHandler(string templateHandler)
The handler that returs the template for FilesTemplate
Returns:Returns the current ChatBuilder instance.
The template used to render file attachments in messages.
[Obsolete("FilesTemplateId is obsolete. Please use FilesTemplateHandler or FilesTemplate instead.")]
public ChatBuilder FilesTemplateId(string templateId)
The ID of the template element for FilesTemplate
Returns:Returns the current ChatBuilder instance.
Defines the collection of items that will be rendered in the Chat header. Each item represents a component or content that appears in the header area above the message list. The items follow the same structure as AppBar items.
public ChatBuilder HeaderItems(Action<AppBarItemFactory> configurator)
The AppBarItemFactory for the header items setting.
Returns:Returns the current instance of ChatBuilder .
A custom template function for rendering the chat header. When set, this overrides the headerItems configuration and provides full control over the header content. The function should return an HTML string.
public ChatBuilder HeaderTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the headertemplate.
Returns:Returns the current ChatBuilder instance.
A custom template function for rendering the chat header. When set, this overrides the headerItems configuration and provides full control over the header content. The function should return an HTML string.
public ChatBuilder HeaderTemplateHandler(string templateHandler)
The handler that returs the template for HeaderTemplate
Returns:Returns the current ChatBuilder instance.
Sets the height of the Chat component.
public ChatBuilder Height(string value)
The value for Height
Returns:Returns the current ChatBuilder instance.
Specifies the field name in the data source from which the unique identifier for each message will be read.
public ChatBuilder IdField(string value)
The value for IdField
Returns:Returns the current ChatBuilder instance.
Specifies the field name in the data source that indicates whether a message has been deleted.
public ChatBuilder IsDeletedField(string value)
The value for IsDeletedField
Returns:Returns the current ChatBuilder instance.
Specifies the field name in the data source that indicates whether a message is pinned.
public ChatBuilder IsPinnedField(string value)
The value for IsPinnedField
Returns:Returns the current ChatBuilder instance.
Specifies the field name in the data source that indicates whether a message is currently being typed.
public ChatBuilder IsTypingField(string value)
The value for IsTypingField
Returns:Returns the current ChatBuilder instance.
Sets the initial loading state of the Chat component. When true, the send button displays a loading/stop indicator instead of the send icon. This is useful for AI chat applications where generating responses takes time. See also the loading method for toggling this state at runtime.
Sets the initial loading state of the Chat component. When true, the send button displays a loading/stop indicator instead of the send icon. This is useful for AI chat applications where generating responses takes time. See also the loading method for toggling this state at runtime.
public ChatBuilder Loading(bool value)
The value for Loading
Returns:Returns the current ChatBuilder instance.
Defines the collection of actions that will be rendered in the context menu for messages. By default, the Chat includes four actions: Reply, Copy, and Pin. You can customize this list by providing your own actions or combining default actions with custom ones.Default actions: { name: "reply", text: "Reply", icon: "undo" }; { name: "copy", text: "Copy", icon: "copy" }; { name: "pin", text: "Pin", icon: "pin" } or { name: "delete", text: "Delete", icon: "trash" }.
public ChatBuilder MessageActions(Action<ChatMessageActionFactory> configurator)
The ChatMessageActionFactory for the messageactions setting.
Returns:Returns the current instance of ChatBuilder .
Configures the built-in message input box (PromptBox). Use this option to customize the default input mode, row count, and auto-grow height when messageBoxTemplate is not set.
public ChatBuilder MessageBox(Action<ChatMessageBoxSettingsBuilder> configurator)
The ChatMessageBoxSettingsBuilder for the messagebox setting.
Returns:Returns the current instance of ChatBuilder .
The template used to render the message input area at the bottom of the Chat. The function receives no arguments and should return an HTML string for the custom message box markup.When using a custom template, the first textarea or supported text input inside the template is used as the message input. To enable send button behavior, add an element with the ref-chat-message-box-send-button attribute. If the template contains input[type='file'] elements, they participate in the file selection flow.
public ChatBuilder MessageBoxTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the messageboxtemplate.
Returns:Returns the current ChatBuilder instance.
The template used to render the message input area at the bottom of the Chat. The function receives no arguments and should return an HTML string for the custom message box markup.When using a custom template, the first textarea or supported text input inside the template is used as the message input. To enable send button behavior, add an element with the ref-chat-message-box-send-button attribute. If the template contains input[type='file'] elements, they participate in the file selection flow.
public ChatBuilder MessageBoxTemplateHandler(string templateHandler)
The handler that returs the template for MessageBoxTemplate
Returns:Returns the current ChatBuilder instance.
A custom template function for rendering the content area inside message bubbles. This template controls only the text/content portion of messages, not the entire message group structure. When set, it is used for both author and receiver messages unless overridden by authorMessageSettings.messageContentTemplate or receiverMessageSettings.messageContentTemplate.
public ChatBuilder MessageContentTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the messagecontenttemplate.
Returns:Returns the current ChatBuilder instance.
A custom template function for rendering the content area inside message bubbles. This template controls only the text/content portion of messages, not the entire message group structure. When set, it is used for both author and receiver messages unless overridden by authorMessageSettings.messageContentTemplate or receiverMessageSettings.messageContentTemplate.
public ChatBuilder MessageContentTemplateHandler(string templateHandler)
The handler that returs the template for MessageContentTemplate
Returns:Returns the current ChatBuilder instance.
The template used to render message groups.
public ChatBuilder MessageGroupTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the messagegrouptemplate.
Returns:Returns the current ChatBuilder instance.
The template used to render message groups.
public ChatBuilder MessageGroupTemplateHandler(string templateHandler)
The handler that returs the template for MessageGroupTemplate
Returns:Returns the current ChatBuilder instance.
The template used to render message groups.
[Obsolete("MessageGroupTemplateId is obsolete. Please use MessageGroupTemplateHandler or MessageGroupTemplate instead.")]
public ChatBuilder MessageGroupTemplateId(string templateId)
The ID of the template element for MessageGroupTemplate
Returns:Returns the current ChatBuilder instance.
The template used to render message references (replies and pinned messages).
public ChatBuilder MessageReferenceTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the messagereferencetemplate.
Returns:Returns the current ChatBuilder instance.
The template used to render message references (replies and pinned messages).
public ChatBuilder MessageReferenceTemplateHandler(string templateHandler)
The handler that returs the template for MessageReferenceTemplate
Returns:Returns the current ChatBuilder instance.
The template used to render message references (replies and pinned messages).
[Obsolete("MessageReferenceTemplateId is obsolete. Please use MessageReferenceTemplateHandler or MessageReferenceTemplate instead.")]
public ChatBuilder MessageReferenceTemplateId(string templateId)
The ID of the template element for MessageReferenceTemplate
Returns:Returns the current ChatBuilder instance.
Allows localization of the strings that are used in the component.
public ChatBuilder Messages(Action<ChatMessagesSettingsBuilder> configurator)
The ChatMessagesSettingsBuilder for the messages setting.
Returns:Returns the current instance of ChatBuilder .
Custom settings for message status display, allowing you to configure icons, text, and CSS classes for each message delivery status. The object should be a mapping from status values ("sent", "delivered", "seen", "failed") to settings objects.Each status settings object accepts: icon - String - Font icon name to display.; text - String - Text label for the status. or cssClass - String - Additional CSS class to apply to the status element..
public ChatBuilder MessageStatusSettings(Action<ChatMessageStatusSettingsSettingsBuilder> configurator)
The ChatMessageStatusSettingsSettingsBuilder for the messagestatussettings setting.
Returns:Returns the current instance of ChatBuilder .
A custom template function for rendering message status indicators. Receives a context object with status (the status string) and message (the message object). When set, this overrides the default status rendering and messageStatusSettings.
public ChatBuilder MessageStatusTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the messagestatustemplate.
Returns:Returns the current ChatBuilder instance.
A custom template function for rendering message status indicators. Receives a context object with status (the status string) and message (the message object). When set, this overrides the default status rendering and messageStatusSettings.
public ChatBuilder MessageStatusTemplateHandler(string templateHandler)
The handler that returs the template for MessageStatusTemplate
Returns:Returns the current ChatBuilder instance.
The template used to render individual messages.
public ChatBuilder MessageTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the messagetemplate.
Returns:Returns the current ChatBuilder instance.
The template used to render individual messages.
public ChatBuilder MessageTemplateHandler(string templateHandler)
The handler that returs the template for MessageTemplate
Returns:Returns the current ChatBuilder instance.
The template used to render individual messages.
[Obsolete("MessageTemplateId is obsolete. Please use MessageTemplateHandler or MessageTemplate instead.")]
public ChatBuilder MessageTemplateId(string templateId)
The ID of the template element for MessageTemplate
Returns:Returns the current ChatBuilder instance.
The format string used to display message timestamps.
public ChatBuilder MessageTimeFormat(string value)
The value for MessageTimeFormat
Returns:Returns the current ChatBuilder instance.
Defines the collection of actions that will be rendered in the message toolbar.
public ChatBuilder MessageToolbarActions(Action<ChatMessageToolbarActionFactory> configurator)
The ChatMessageToolbarActionFactory for the messagetoolbaractions setting.
Returns:Returns the current instance of ChatBuilder .
Sets the messages width mode.
public ChatBuilder MessageWidthMode(ChatMessageWidth mode)
Returns the current ChatBuilder instance.
A custom template function for rendering an empty state when the chat has no messages. When set, the template output is displayed in place of the empty message list area, providing a visual cue that the conversation has not started yet.
public ChatBuilder NoDataTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the nodatatemplate.
Returns:Returns the current ChatBuilder instance.
A custom template function for rendering an empty state when the chat has no messages. When set, the template output is displayed in place of the empty message list area, providing a visual cue that the conversation has not started yet.
public ChatBuilder NoDataTemplateHandler(string templateHandler)
The handler that returs the template for NoDataTemplate
Returns:Returns the current ChatBuilder instance.
Documents the default endless batch size.When scrollMode is set to "endless", the effective batch size comes from dataSource.pageSize() for the initial latest window, older/newer adjacent loads, and jump requests. Configure the bound DataSource page size for endless mode instead of relying on a separate Chat range contract, because a root Chat pageSize value does not override the bound DataSource page size.If the bound DataSource does not declare a valid page size, the Chat seeds the DataSource with the default endless batch size of 20 before the first endless load.
public ChatBuilder PageSize(double value)
The value for PageSize
Returns:Returns the current ChatBuilder instance.
Provides a stable root-level collection that the Chat can use for pinned-message banners when the current endless-scroll window does not contain the pinned target.This option is most useful with scrollMode set to "endless" and a server-paged dataSource.The Chat uses the last item in the pinnedMessages array as the active pinned banner. Each item can be a full message object or a partial object, but it must contain enough data to identify the target and render the pinned banner.If the pinned target is not part of the current remote window, the Chat can still render the banner from pinnedMessages while using the endless endpoint to load the target batch when the banner is clicked.
public ChatBuilder PinnedMessages(Action<ChatPinnedMessageFactory> configurator)
The ChatPinnedMessageFactory for the pinnedmessages setting.
Returns:Returns the current instance of ChatBuilder .
User-specific message settings applied to messages received from other users. These settings override the global display options like showAvatar, showUsername, and messageWidthMode for receiver messages only. See also authorMessageSettings.The object accepts the following properties: showAvatar - Boolean - Whether to show the avatar for receiver messages.; showUsername - Boolean - Whether to show the username for receiver messages.; messageWidthMode - String - Message width mode: "standard" or "full".; allowMessageCollapse - Boolean - Whether receiver messages can be collapsed.; messageTemplate - Function - Template override for receiver messages. Receives the same arguments as messageTemplate.; messageContentTemplate - Function - Content template override for receiver messages. Receives the current message object.; enableFileActions - Boolean - Whether file actions are enabled for receiver messages.; enableContextMenuActions - Boolean - Whether context menu actions are enabled for receiver messages.; messageToolbarActions - Array - Toolbar actions specific to receiver messages. or messageActions - Array - Context menu actions specific to receiver messages..
public ChatBuilder ReceiverMessageSettings(Action<ChatMessageSettingsBuilder> configurator)
The ChatMessageSettingsBuilder for the receivermessagesettings setting.
Returns:Returns the current instance of ChatBuilder .
Specifies the field name in the data source that contains the ID of the message being replied to.
public ChatBuilder ReplyToIdField(string value)
The value for ReplyToIdField
Returns:Returns the current ChatBuilder instance.
The scroll mode for the scrollable behavior.
public ChatBuilder ScrollMode(ChatScrollMode value)
The value for ScrollMode
Returns:Returns the current ChatBuilder instance.
Shows or hides the floating scroll-to-bottom button that appears when the user moves away from the latest messages. In endless scrolling mode, the button is also used to return to the latest rendered batch before scrolling to its bottom.
public ChatBuilder ScrollToBottomButton(bool value)
The value for ScrollToBottomButton
Returns:Returns the current ChatBuilder instance.
Controls whether avatars are displayed next to messages. This is a global setting that can be overridden per-user via authorMessageSettings and receiverMessageSettings.
public ChatBuilder ShowAvatar(bool value)
The value for ShowAvatar
Returns:Returns the current ChatBuilder instance.
Controls whether usernames are displayed above messages. This is a global setting that can be overridden per-user via authorMessageSettings and receiverMessageSettings.
public ChatBuilder ShowUsername(bool value)
The value for ShowUsername
Returns:Returns the current ChatBuilder instance.
Controls whether HTML sanitization is skipped when rendering message content. When set to true, the Chat component will not automatically encode HTML entities in message text, allowing for rich HTML content to be displayed. This is useful when integrating with markdown parsers or when you need to display pre-formatted HTML content.Warning: Setting this to true can introduce security vulnerabilities if user input is not properly sanitized elsewhere in your application. Only use this option when you trust the content source or have implemented your own sanitization logic.
Controls whether HTML sanitization is skipped when rendering message content. When set to true, the Chat component will not automatically encode HTML entities in message text, allowing for rich HTML content to be displayed. This is useful when integrating with markdown parsers or when you need to display pre-formatted HTML content.Warning: Setting this to true can introduce security vulnerabilities if user input is not properly sanitized elsewhere in your application. Only use this option when you trust the content source or have implemented your own sanitization logic.
public ChatBuilder SkipSanitization(bool value)
The value for SkipSanitization
Returns:Returns the current ChatBuilder instance.
Configures speech-to-text functionality in the message input. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
public ChatBuilder SpeechToText(Action<ChatSpeechToTextSettingsBuilder> configurator)
The ChatSpeechToTextSettingsBuilder for the speechtotext setting.
Returns:Returns the current instance of ChatBuilder .
Configures speech-to-text functionality in the message input. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
public ChatBuilder SpeechToText(bool enabled)
Enables or disables the speechtotext option.
Returns:Returns the current instance of ChatSpeechToTextSettingsBuilder .
Specifies the field name in the data source from which the message status will be read. The status describes the delivery state of the message (e.g. "Sending", "Sent", "Delivered", "Seen", "Failed"). See also messageStatusSettings.
public ChatBuilder StatusField(string value)
The value for StatusField
Returns:Returns the current ChatBuilder instance.
Layout mode for suggested actions.
public ChatBuilder SuggestedActionsLayoutMode(SuggestionsLayoutMode value)
The value for SuggestedActionsLayoutMode
Returns:Returns the current ChatBuilder instance.
Deprecated: Use suggestedActionsLayoutMode instead.Enables or disables scrollable behavior for suggested actions.
public ChatBuilder SuggestedActionsScrollable()
Returns the current ChatBuilder instance.
Deprecated: Use suggestedActionsLayoutMode instead.Enables or disables scrollable behavior for suggested actions.
public ChatBuilder SuggestedActionsScrollable(bool value)
The value for SuggestedActionsScrollable
Returns:Returns the current ChatBuilder instance.
The template used to render suggested actions.
public ChatBuilder SuggestedActionsTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the suggestedactionstemplate.
Returns:Returns the current ChatBuilder instance.
The template used to render suggested actions.
public ChatBuilder SuggestedActionsTemplateHandler(string templateHandler)
The handler that returs the template for SuggestedActionsTemplate
Returns:Returns the current ChatBuilder instance.
The template used to render suggested actions.
[Obsolete("SuggestedActionsTemplateId is obsolete. Please use SuggestedActionsTemplateHandler or SuggestedActionsTemplate instead.")]
public ChatBuilder SuggestedActionsTemplateId(string templateId)
The ID of the template element for SuggestedActionsTemplate
Returns:Returns the current ChatBuilder instance.
Defines the collection of suggested messages that users can quickly select. These appear as clickable buttons below the message input area, allowing users to send common responses quickly.
public ChatBuilder Suggestions(Action<ChatSuggestionFactory> configurator)
The ChatSuggestionFactory for the suggestions setting.
Returns:Returns the current instance of ChatBuilder .
Controls what happens when a user selects a suggestion.
public ChatBuilder SuggestionsBehavior(ChatSuggestionsBehavior value)
The value for SuggestionsBehavior
Returns:Returns the current ChatBuilder instance.
The layout mode for the message box suggestions.
public ChatBuilder SuggestionsLayoutMode(SuggestionsLayoutMode value)
The value for SuggestionsLayoutMode
Returns:Returns the current ChatBuilder instance.
Deprecated: Use suggestionsLayoutMode instead.Enables or disables scrollable behavior for message suggestions.
Deprecated: Use suggestionsLayoutMode instead.Enables or disables scrollable behavior for message suggestions.
public ChatBuilder SuggestionsScrollable(bool value)
The value for SuggestionsScrollable
Returns:Returns the current ChatBuilder instance.
The template used to render message suggestions.
public ChatBuilder SuggestionsTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the suggestionstemplate.
Returns:Returns the current ChatBuilder instance.
The template used to render message suggestions.
public ChatBuilder SuggestionsTemplateHandler(string templateHandler)
The handler that returs the template for SuggestionsTemplate
Returns:Returns the current ChatBuilder instance.
The template used to render message suggestions.
[Obsolete("SuggestionsTemplateId is obsolete. Please use SuggestionsTemplateHandler or SuggestionsTemplate instead.")]
public ChatBuilder SuggestionsTemplateId(string templateId)
The ID of the template element for SuggestionsTemplate
Returns:Returns the current ChatBuilder instance.
Specifies the field name in the data source from which the message text content will be read.
public ChatBuilder TextField(string value)
The value for TextField
Returns:Returns the current ChatBuilder instance.
Specifies the field name in the data source from which the message timestamp will be read.
public ChatBuilder TimestampField(string value)
The value for TimestampField
Returns:Returns the current ChatBuilder instance.
The template used to render timestamp elements that separate message groups by date. When set to null, the default timestamp logic is used which displays relative dates like "Today", "Yesterday", "Last Wednesday", or absolute dates for older messages.The template function receives an object with date (parsed Date object) and message (current message object) properties and should return the complete HTML structure for the timestamp element.Returning null or an empty string will hide the time breaks from the chat.
public ChatBuilder TimestampTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the timestamptemplate.
Returns:Returns the current ChatBuilder instance.
The template used to render timestamp elements that separate message groups by date. When set to null, the default timestamp logic is used which displays relative dates like "Today", "Yesterday", "Last Wednesday", or absolute dates for older messages.The template function receives an object with date (parsed Date object) and message (current message object) properties and should return the complete HTML structure for the timestamp element.Returning null or an empty string will hide the time breaks from the chat.
public ChatBuilder TimestampTemplateHandler(string templateHandler)
The handler that returs the template for TimestampTemplate
Returns:Returns the current ChatBuilder instance.
The template used to render timestamp elements that separate message groups by date. When set to null, the default timestamp logic is used which displays relative dates like "Today", "Yesterday", "Last Wednesday", or absolute dates for older messages.The template function receives an object with date (parsed Date object) and message (current message object) properties and should return the complete HTML structure for the timestamp element.Returning null or an empty string will hide the time breaks from the chat.
[Obsolete("TimestampTemplateId is obsolete. Please use TimestampTemplateHandler or TimestampTemplate instead.")]
public ChatBuilder TimestampTemplateId(string templateId)
The ID of the template element for TimestampTemplate
Returns:Returns the current ChatBuilder instance.
Controls the visibility of message timestamps.
public ChatBuilder TimestampVisibility(ChatTimestampVisibility value)
The value for TimestampVisibility
Returns:Returns the current ChatBuilder instance.
Configures the toolbar of the Chat.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases.")]
public ChatBuilder Toolbar(Action<ChatToolbarSettingsBuilder> configurator)
The ChatToolbarSettingsBuilder for the toolbar setting.
Returns:Returns the current instance of ChatBuilder .
Configures the user information of the Chat.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases.")]
public ChatBuilder User(Action<ChatUserSettingsBuilder> configurator)
The ChatUserSettingsBuilder for the user setting.
Returns:Returns the current instance of ChatBuilder .
The template used to render the user status content shown next to the latest message in a receiver group. The function receives a context object with a message field, where message.author contains the normalized author data, and should return an HTML string.
public ChatBuilder UserStatusTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the userstatustemplate.
Returns:Returns the current ChatBuilder instance.
The template used to render the user status content shown next to the latest message in a receiver group. The function receives a context object with a message field, where message.author contains the normalized author data, and should return an HTML string.
public ChatBuilder UserStatusTemplateHandler(string templateHandler)
The handler that returs the template for UserStatusTemplate
Returns:Returns the current ChatBuilder instance.
Sets the width of the Chat component.
public ChatBuilder Width(string value)
The value for Width
Returns:Returns the current ChatBuilder instance.