PromptBox

Example

Razor
<kendo-promptbox>
    <action-button></action-button>
    <end-affix-template></end-affix-template>
    <file-select-button></file-select-button>
    <messages />
    <speech-to-text-button />
    <start-affix-template></start-affix-template>
    <top-affix-template></top-affix-template>
</kendo-promptbox>

ChildTags

Attributes

AttributeTypeDescription
nameStringSets the name of the component.
as-moduleBooleanSpecifies whether the initialization script of the component will be rendered as a JavaScript module.
is-in-client-templateBooleanWhen placing a Tag Helper within a Kendo Template, set the type to text/html and add the is-in-client-template="true" attribute.
deferredBooleanSuppress initialization script rendering. Note that this options should be used in conjunction with DeferredScripts method.
enableBooleanIf set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.
end-affix-template-handlerStringDefines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons. This option expects the name of a JavaScript function that will be called to return the template.
fill-modeFillModeDefines the fill mode for the PromptBox container.
loadingBooleanSets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.
max-text-area-heightDoubleSets 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.
modePromptBoxModeSets 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.
on-blurStringThe name of the JavaScript function that will handle the blur event. Fires each time the PromptBox loses focus.
on-file-removeStringThe name of the JavaScript function that will handle the fileRemove event. Fires each time the user removes a file attachment.
on-file-selectStringThe name of the JavaScript function that will handle the fileSelect event. Fires each time the user selects files using the File Select button.
on-focusStringThe name of the JavaScript function that will handle the focus event. Fires each time the PromptBox receives focus.
on-inputStringThe name of the JavaScript function that will handle the input event. Fires each time the user types in the input field.
on-input-blurStringThe name of the JavaScript function that will handle the inputBlur event. Fires each time the internal input element loses focus.
on-input-focusStringThe name of the JavaScript function that will handle the inputFocus event. Fires each time the internal input element receives focus.
on-multiline-state-changeStringThe name of the JavaScript function that will handle the multilineStateChange event. Fires when the PromptBox transitions between single-line and multi-line states in auto mode.
on-prompt-actionStringThe name of the JavaScript function that will handle the promptAction event. Fires when the action button is clicked (send or stop). Check e.actionType to determine the action.
on-speech-to-text-clickStringThe name of the JavaScript function that will handle the speechToTextClick event. Fires each time the user clicks the Speech to Text button.
on-speech-to-text-endStringThe name of the JavaScript function that will handle the speechToTextEnd event. Fires when the speech recognition service disconnects.
on-speech-to-text-errorStringThe name of the JavaScript function that will handle the speechToTextError event. Fires when a speech recognition error occurs.
on-speech-to-text-resultStringThe name of the JavaScript function that will handle the speechToTextResult event. Fires when the speech recognition service returns a result.
on-speech-to-text-startStringThe name of the JavaScript function that will handle the speechToTextStart event. Fires when the speech recognition service begins listening.
on-value-changeStringThe name of the JavaScript function that will handle the valueChange event. Fires when the value changes through user input (not programmatic changes).
placeholderStringSets the placeholder text displayed in the PromptBox when it is empty.
readonlyBooleanSets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.
rowsDoubleSets the number of visible text lines in the textarea. Applies only when the mode is set to "multi".
script-attributesIDictionary<String,Object>Sets the attributes that will be added to the script tag of the component's initialization script.
start-affix-template-handlerStringDefines a custom template for the start affix area. The start affix is positioned before the input field. This option expects the name of a JavaScript function that will be called to return the template.
titleStringSets the title attribute of the input or textarea element.
top-affix-template-handlerStringDefines 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. This option expects the name of a JavaScript function that will be called to return the template.
valueStringSets the value of the PromptBox.
In this article
ExampleChildTagsAttributes
Not finding the help you need?
Contact Support