PromptBoxProps
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.
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).
defaultValue?
string
The default value of the PromptBox (uncontrolled mode).
disabled?
boolean
Sets the disabled state of the PromptBox component.
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
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.
false
maxLength?
number
Sets the maximum number of characters allowed in the text input element.
maxTextAreaHeight?
string
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 inputmulti- Multi-line textareaauto- Transforms the PromptBox from single to multi line mode based on content
'auto'
onBlur?
(event: PromptBoxBlurEvent) => void
The event handler that will be fired when the PromptBox is blurred.
onChange?
(event: PromptBoxChangeEvent) => void
The event handler that will be fired when the value changes.
onFocus?
(event: PromptBoxFocusEvent) => void
The event handler that will be fired when the PromptBox is focused.
onPromptAction?
(event: PromptBoxPromptActionEvent) => void
Fires when the user clicks the Action button. The event provides the current value and attachments, allowing simple uncontrolled usage.
placeholder?
string
The hint, which is displayed when the text input element is empty.
''
readOnly?
boolean
Sets the read-only state of the PromptBox component.
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.
1
speechToTextButtonConfig?
boolean | SpeechToTextButtonProps
Sets the SpeechToText button visibility and/or settings.
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.
''
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.
uploadButtonConfig?
boolean | UploadButtonProps
Sets the File Attachments button visibility and/or settings.
false
value?
string
Sets the value for the internal input/textarea of the PromptBox.
''