PromptBox
Kendo UI PromptBox component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class PromptBox : WidgetBase, IWidget, IHtmlAttributesContainer, IScriptableComponent
Inheritance: objectWidgetBasePromptBox
Implements:
Inherited Members
Constructors
Initializes a new instance of the PromptBox class.
public PromptBox(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
The view context
initializerIJavaScriptInitializerThe JavaScriptInitializer
urlGeneratorIUrlGeneratorThe URL generator.
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; set; }
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; }
The handler for the EndAffixTemplate
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; set; }
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; set; }
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; set; }
The handler for the StartAffixTemplate
public string StartAffixTemplateHandler { get; set; }
Sets the title attribute of the input or textarea element.
public string Title { get; set; }
The handler for the TopAffixTemplate
public string TopAffixTemplateHandler { get; set; }
Methods
public override IDictionary<string, object> Serialize()
Overrides:
Writes the HTML.
protected override void WriteHtml(HtmlTextWriter writer)
The HtmlTextWriter.
Overrides:
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The TextWriter.
Overrides: