New to Kendo UI for Vue? Start a free 30-day trial

PromptBox

Component

Represents the Kendo UI for Vue PromptBox component. Accepts properties of type PromptBoxProps.

Definition

Package:@progress/kendo-vue-conversational-ui

Properties Interface:PromptBoxProps

Syntax:

vue
<PromptBox
    :value="promptValue"
    :mode="'multi'"
    :rows="3"
    :placeholder="'Ask about order #10248...'"
    :loading="isLoading"
    :upload-button-config="true"
    :speech-to-text-button-config="true"
    :action-button-config="true"
    @change="onChange"
    @promptaction="onPromptAction"
/>

Properties

actionButtonConfig?

boolean | ButtonProps

Shows or hides the Send button, or sets its settings.

Default:

true

attachments?

UploadFileInfo[]

Sets the attachments in controlled mode. When you set it, the PromptBox works in controlled mode and you manage the attachments. When you do not set it, the PromptBox manages the attachments internally (uncontrolled mode).

Sets the initial value of the PromptBox (uncontrolled mode).

Default:

''

disabled?

boolean

Disables the PromptBox.

Default:

false

Sets custom content at the end of the input element. In multi mode, and in auto mode with more than one row, the PromptBox renders it at the bottom right of the textarea. The custom content appears BEFORE the built-in buttons. Accepts a render function that receives AffixTemplateProps, or a Vue VNode.

fillMode?

"flat" | "solid" | "outline"

Sets the fillMode of the PromptBox.

The available options are:

  • solid
  • outline
  • flat

inputAttributes?

Record​<string, any>

Sets HTML attributes on the inner focusable input element.

loading?

boolean

Turns the Send button into a Stop generating button.

Default:

false

Sets the maximum number of characters that the user can type in the text input element.

Sets the maximum height of the textarea in pixels. When the text is taller than this value, a scrollbar appears. Applies to the multi and auto modes.

Sets the line mode of the PromptBox.

The available options are:

  • single - Renders a single-line text input.
  • multi - Renders a multi-line textarea.
  • auto - Switches the PromptBox from single-line to multi-line mode based on the content.
Default:

'auto'

Sets the hint that the text input element shows when it is empty.

readOnly?

boolean

Makes the PromptBox read-only.

Default:

false

rows?

number

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

Default:

1

speechToTextButtonConfig?

boolean | SpeechToTextButtonProps

Shows or hides the SpeechToText button, or sets its settings.

Default:

true

Sets custom content at the start of the input element in single-line mode. In multi mode, and in auto mode with more than one row, the PromptBox renders it at the bottom left of the textarea. Accepts a render function that receives AffixTemplateProps, or a Vue VNode.

title?

string

Sets the title HTML attribute of the text input element.

Sets custom content at the top of the PromptBox. The PromptBox renders it only when mode is multi. Accepts a render function that receives AffixTemplateProps, or a Vue VNode.

Shows or hides the File Attachments button, or sets its settings.

Default:

false

value?

string

Sets the value of the input or textarea of the PromptBox (controlled mode).