PromptBox
Kendo UI PromptBox component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class PromptBox : WidgetBase, IHtmlAttributesContainer
Inheritance: objectWidgetBasePromptBox
Implements:
Inherited Members
Constructors
Initializes a new instance of the PromptBox class.
Properties
Configures the Action button (send/stop) in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
public PromptBoxActionButtonSettings ActionButton { get; }
If set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.
public bool? Enable { get; set; }
Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.When the built-in PromptBox buttons are enabled, the authored end-affix content stays in place and the framework backfills any missing built-in controls after it inside the same end-affix container. To adopt a custom element instead of the default control, include ref-promptbox-send-button, ref-promptbox-file-select-button, or ref-promptbox-speech-to-text-button on the authored element.
public string EndAffixTemplateHandler { get; set; }
Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.
public PromptBoxFileSelectButtonSettings FileSelectButton { get; }
Defines the fill mode for the PromptBox container.
public FillMode? FillMode { get; set; }
Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.
public bool? Loading { get; set; }
Sets the maximum height of the textarea in pixels. The textarea resizes automatically until it reaches this height. When the content exceeds this height, a scrollbar appears.
public double? MaxTextAreaHeight { get; set; }
Defines the localization messages for the PromptBox.
public PromptBoxMessagesSettings Messages { get; }
Sets the mode of the PromptBox. Available options are "single", "multi", and "auto". single - Displays a single-line input field; multi - Displays a multi-line textarea with configurable rows or auto - Starts as a single line and expands automatically as the user types.
public PromptBoxMode? Mode { get; set; }
Sets the placeholder text displayed in the PromptBox when it is empty.
public string Placeholder { get; set; }
Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.
public bool? Readonly { get; set; }
Sets the number of visible text lines in the textarea. Applies only when the mode is set to "multi".
public double? Rows { get; set; }
Configures the Speech to Text button in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
public PromptBoxSpeechToTextButtonSettings SpeechToTextButton { get; }
Defines a custom template for the start affix area. The start affix is positioned before the input field.
public string StartAffixTemplateHandler { get; set; }
Sets the title attribute of the input or textarea element.
public string Title { get; set; }
Defines a custom template for the top affix area. The top affix is positioned at the top of the content area in multi-line mode only.
public string TopAffixTemplateHandler { get; set; }
Methods
Serialize the current instance to Dictionary
public override IDictionary<string, object> Serialize()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML.
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The TextWriter.
Overrides: