New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI PromptBox component

Definition

Constructors

Initializes a new instance of the PromptBox class.

C#
public PromptBox(ViewContext viewContext)
Parameters:viewContextViewContext

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.

C#
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.

C#
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.

C#
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.

C#
public PromptBoxFileSelectButtonSettings FileSelectButton { get; }

Defines the fill mode for the PromptBox container.

C#
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.

C#
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.

C#
public double? MaxTextAreaHeight { get; set; }

Defines the localization messages for the PromptBox.

C#
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.

C#
public PromptBoxMode? Mode { get; set; }

Sets the placeholder text displayed in the PromptBox when it is empty.

C#
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.

C#
public bool? Readonly { get; set; }

Sets the number of visible text lines in the textarea. Applies only when the mode is set to "multi".

C#
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.

C#
public PromptBoxSpeechToTextButtonSettings SpeechToTextButton { get; }

Defines a custom template for the start affix area. The start affix is positioned before the input field.

C#
public string StartAffixTemplateHandler { get; set; }

Sets the title attribute of the input or textarea element.

C#
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.

C#
public string TopAffixTemplateHandler { get; set; }

Sets the value of the PromptBox.

C#
public string Value { get; set; }

Methods

Serialize the current instance to Dictionary

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: WidgetBase.SerializeSettings()

Writes the HTML.

C#
protected override void WriteHtml(TextWriter writer)
Parameters:writerTextWriter

Overrides: WidgetBase.WriteHtml(TextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)