ClassTelerikPromptBox
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
TelerikPromptBox()
Declaration
public TelerikPromptBox()
Properties
AutoComplete
Defines the autocomplete HTML attribute of the component.
Declaration
[Parameter]
public string AutoComplete { get; set; }
Property Value
EnableActionButton
Enables or disables the action button in the prompt box component.
Declaration
[Parameter]
public bool EnableActionButton { get; set; }
Property Value
EnableFileSelect
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.
Declaration
[Parameter]
public bool EnableFileSelect { get; set; }
Property Value
EnableSpeechToText
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.
Declaration
[Parameter]
public bool EnableSpeechToText { get; set; }
Property Value
FillMode
Specifies the fill mode of the PromptBox. Default value is Solid.
Declaration
[Parameter]
public override string FillMode { get; set; }
Property Value
Overrides
InputFiles
Gets or sets the collection of files selected as input for processing.
Declaration
[Parameter]
public IList<FileSelectFileInfo> InputFiles { get; set; }
Property Value
IList<FileSelectFileInfo>
InputFilesChanged
Event callback that is triggered when files are selected through the file select button. Provides the list of selected files as arguments.
Declaration
[Parameter]
public EventCallback<IList<FileSelectFileInfo>> InputFilesChanged { get; set; }
Property Value
EventCallback<IList<FileSelectFileInfo>>
IsLoading
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 .
MaxLength
Gets or sets the maximum number of characters allowed in the input.
MaxTextAreaHeight
Gets or sets the maximum height for multi-line or auto mode (e.g. "200px"), preventing uncontrolled vertical growth.
Declaration
[Parameter]
public string MaxTextAreaHeight { get; set; }
Property Value
Mode
Defines the mode of the PromptBox - single-line, multi-line, or auto.
Declaration
[Parameter]
public PromptBoxMode Mode { get; set; }
Property Value
OnPromptAction
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.
Declaration
[Parameter]
public EventCallback<PromptBoxActionButtonEventArgs> OnPromptAction { get; set; }
Property Value
PromptBoxEndAffixTemplate
Use for actions like send buttons or status indicators positioned at the end.
Declaration
[Parameter]
public RenderFragment PromptBoxEndAffixTemplate { get; set; }
Property Value
PromptBoxSettings
Defines a render fragment that contains all settings for the PromptBox. Children: PromptBoxSpeechToTextButtonSettings, PromptBoxFileSelectButtonSettings, PromptBoxActionButtonSettings.
Declaration
[Parameter]
public RenderFragment PromptBoxSettings { get; set; }
Property Value
PromptBoxStartAffixTemplate
Template rendered before the input (prefix/start affix). Use for icons, buttons, or context labels positioned at the start.
Declaration
[Parameter]
public RenderFragment PromptBoxStartAffixTemplate { get; set; }
Property Value
PromptBoxTopAffixTemplate
Template rendered above the input (top affix). Use for headings, helper text, or suggestion chips shown above the prompt box.
Declaration
[Parameter]
public RenderFragment PromptBoxTopAffixTemplate { get; set; }
Property Value
Rounded
Specifies the rounding of the PromptBox. Default value is Medium.
Declaration
[Parameter]
public override string Rounded { get; set; }
Property Value
Overrides
Rows
Declaration
[Parameter]
public int Rows { get; set; }
Property Value
Remarks
If not explicitly set, defaults to 1 in auto mode and 3 in multiline mode.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
OnParametersSet()
Declaration
protected override void OnParametersSet()
Overrides
RemoveActionButtonSettings()
Declaration
public void RemoveActionButtonSettings()