🚧 MateChat React document is still under development

Sender

Sender is a component of textarea used to input and send messages.

Examples

Properties

InputCount

PropertyDescriptionTypeDefault Value

SenderButton

PropertyDescriptionTypeDefault Value
iconIcon to display in the button. Defaults to a send icon when isSending is false, and a stop icon when isSending is true. The icon will be overridden if provided.ReactNode-
isSendingWhether runtime is currently sending a message. If true, the button will display a stop icon instead of the send icon.boolean-

Sender

PropertyDescriptionTypeDefault Value
initialMessageInitial message to display in the input field.string-
placeholderPlaceholder text for the input field.stringType your message here...
inputFunction to handle input changes.(prompt: string, config?: unknown) => Awaitable<void> (Required)-
onMessageChangeFunction to handle message changes. @param message - The new message.(message: string) => void-
onSendFunction to handle the send action. This function is called when the send button is clicked. It receives an AbortController that can be used to abort the request. @param controller - The AbortController to abort the request.(controller: AbortController) => void-
ON THIS PAGE