New to KendoReactStart a free 30-day trial

Represents the props of the PromptBox component.

Definition

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

Properties

actionButtonConfig?

boolean | ButtonProps

Sets the send button visibility and/or settings.

Default:

true

attachments?

UploadFileInfo[]

Sets the attachments for controlled file management. When provided, the component operates in controlled mode and the developer must manage attachments via onSelectAttachments and onRemoveAttachment. When not provided, the component manages attachments internally (uncontrolled mode).

The default value of the PromptBox (uncontrolled mode).

disabled?

boolean

Sets the disabled state of the PromptBox component.

Default:

false

endAffix?

ReactNode | (props: AffixTemplateProps) => ReactNode

Custom content rendered at the end of the input element. In 'multi' and 'auto' with more than one row, it is rendered at the bottom right of the textarea. Custom content appears BEFORE built-in buttons.

fillMode?

"solid" | "outline" | "flat"

Configures the fillMode of the PromptBox.

The available options are:

  • solid
  • outline
  • flat
Default:

undefined (theme-controlled)

inputAttributes?

InputHTMLAttributes​<HTMLInputElement | HTMLTextAreaElement>

Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.

loading?

boolean

Specifies whether the Send button is transformed to a stop generation button.

Default:

false

Sets the maximum number of characters allowed in the text input element.

Sets the maximum height of the native textarea in px. When the text height exceeds this value, a scrollbar appears. Applicable for multi and auto modes.

Sets the line mode for the PromptBox component.

The available options are:

  • single - Sets one line for the text input
  • multi - Multi-line textarea
  • auto - Transforms the PromptBox from single to multi line mode based on content
Default:

'auto'

onBlur?

(event: PromptBoxBlurEvent) => void

The event handler that will be fired when the PromptBox is blurred.

Parameters:eventPromptBoxBlurEvent

The event handler that will be fired when the value changes.

Parameters:eventPromptBoxChangeEvent

The event handler that will be fired when the PromptBox is focused.

Parameters:eventPromptBoxFocusEvent

Fires when the user clicks the Action button. The event provides the current value and attachments, allowing simple uncontrolled usage.

Parameters:eventPromptBoxPromptActionEvent

The hint, which is displayed when the text input element is empty.

Default:

''

readOnly?

boolean

Sets the read-only state of the PromptBox component.

Default:

false

rows?

number

Sets the visible height of the internal textarea in lines. Only applicable when mode is 'multi'. This sets the minimum number of rows.

Default:

1

speechToTextButtonConfig?

boolean | SpeechToTextButtonProps

Sets the SpeechToText button visibility and/or settings.

Default:

true

startAffix?

ReactNode | (props: AffixTemplateProps) => ReactNode

Custom content rendered at the start of the input element in single line mode. In 'multi' and 'auto' with more than one row, it is rendered at the bottom left of the textarea.

title?

string

Sets the title attribute of the internal text input element of the component.

Default:

''

topAffix?

ReactNode | (props: AffixTemplateProps) => ReactNode

Custom content rendered at the top of the PromptBox. Only rendered when mode is 'multi' or when 'auto' mode has more than 1 row.

Sets the File Attachments button visibility and/or settings.

Default:

false

value?

string

Sets the value for the internal input/textarea of the PromptBox.

Default:

''