TelerikPromptBox
Represents a chat-style input box component for user prompts and messages.
The PromptBox allows users to type text, supports event callbacks
for value changes, and provides customizable templates for affixes at the start, end, or top of the input area.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class TelerikPromptBox : TextBoxBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikInputBase<string>TextBoxBaseTelerikPromptBox...
Implements:
Inherited Members
Constructors
public TelerikPromptBox()
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
protected override void OnParametersSet()
Overrides:
public void RemoveActionButtonSettings()
Properties
[Accessibility] Defines the autocomplete HTML attribute of the component.
[Parameter]
public string AutoComplete { get; set; }
Enables or disables the action button in the prompt box component.
[Parameter]
public bool EnableActionButton { get; set; }
Enables or disables the file select functionality in the prompt box component. Renders a file upload icon in the prompt box that allows users to select files.
[Parameter]
public bool EnableFileSelect { get; set; }
Enables or disables the speech-to-text functionality in the prompt box component. Renders a microphone icon in the promptbox input area that allows users to convert speech to text.
[Parameter]
public bool EnableSpeechToText { get; set; }
Specifies the fill mode of the PromptBox. Default value is Solid.
[Parameter]
public override string FillMode { get; set; }
Overrides:
InputFiles
IList<FileSelectFileInfo>
Gets or sets the collection of files selected as input for processing.
[Parameter]
public IList<FileSelectFileInfo> InputFiles { get; set; }
InputFilesChanged
EventCallback<IList<FileSelectFileInfo>>
Event callback that is triggered when files are selected through the file select button. Provides the list of selected files as arguments.
[Parameter]
public EventCallback<IList<FileSelectFileInfo>> InputFilesChanged { get; set; }
Gets or sets a value indicating whether the prompt box is in a loading state. When true, the action button shows the stop / (loading icon) set in .
[Parameter]
public bool IsLoading { get; set; }
Gets or sets the maximum number of characters allowed in the input.
[Parameter]
public int? MaxLength { get; set; }
Gets or sets the maximum height for multi-line or auto mode (e.g. "200px"), preventing uncontrolled vertical growth.
[Parameter]
public string MaxTextAreaHeight { get; set; }
Defines the mode of the PromptBox - single-line, multi-line, or auto.
[Parameter]
public PromptBoxMode Mode { get; set; }
Event callback that is triggered when a text is submitted or stop operation is triggered when IsLoading is true. The arguments are of type PromptBoxActionButtonEventArgs.
[Parameter]
public EventCallback<PromptBoxActionButtonEventArgs> OnPromptAction { get; set; }
Use for actions like send buttons or status indicators positioned at the end.
[Parameter]
public RenderFragment PromptBoxEndAffixTemplate { get; set; }
Defines a render fragment that contains all settings for the PromptBox. Children: PromptBoxSpeechToTextButtonSettings, PromptBoxFileSelectButtonSettings, PromptBoxActionButtonSettings.
[Parameter]
public RenderFragment PromptBoxSettings { get; set; }
Template rendered before the input (prefix/start affix). Use for icons, buttons, or context labels positioned at the start.
[Parameter]
public RenderFragment PromptBoxStartAffixTemplate { get; set; }
Template rendered above the input (top affix). Use for headings, helper text, or suggestion chips shown above the prompt box.
[Parameter]
public RenderFragment PromptBoxTopAffixTemplate { get; set; }
Specifies the rounding of the PromptBox. Default value is Medium.
[Parameter]
public override string Rounded { get; set; }
Overrides: