This component is data aware

Component

The ChatInput component is an input for sending messages to a chat.

API

Import

import { ChatInput } from "@botstacks/chat-react";

Props

NameTypeDefaultDescription
onSendMessage(input: SendMessageInput) => voidCallback for sending a message
onClose() => voidCallback for canceling edit message
placeholderstringPlaceholder text for the input
disableMediaButtonbooleanfalse

If true, hides the media button for uploading files and adding gifs

classNamesobject

Specific class names to override nested components. Options are input, content, and send.

chatIdstringIf provided, handles typing indicator for the specified chat
isEditingbooleanIf true, showing editing UI

Variations