API reference: @salmonui/chat/conversation
ConversationComposercomponent
import { ConversationComposer } from '@salmonui/chat/conversation';function ConversationComposer(props: ConversationComposerProps): ReactNode;
Props: ConversationComposerProps
| Name | Signature | Description |
|---|---|---|
placeholderoptional | readonly placeholder?: string; | |
valueoptional | readonly value?: string; | Controlled draft. |
defaultValueoptional | readonly defaultValue?: string; | |
onValueChangeoptional | readonly onValueChange?: (value: string) => void; | |
clearableoptional | readonly clearable?: boolean; | Shows a clear button while there is a draft. |
disabledoptional | readonly disabled?: boolean; | |
rowsoptional | readonly rows?: number; | Visible rows of the textarea (default 1; it grows with content). |
mentionsoptional | readonly mentions?: readonly ConversationMentionConfig[]; | |
onBeforeMentionSelectoptional | readonly onBeforeMentionSelect?: (event: ConversationBeforeMentionSelectEvent) => void; | |
onMentionSelectoptional | readonly onMentionSelect?: (event: ConversationMentionSelectEvent) => void; | |
attachmentsoptional | readonly attachments?: boolean | ConversationAttachmentOptions; | Enables attachments ( |
onBeforeAttachoptional | readonly onBeforeAttach?: (event: ConversationBeforeAttachEvent) => void; | |
onAttachoptional | readonly onAttach?: (event: ConversationAttachEvent) => void; | |
onAttachmentRemoveoptional | readonly onAttachmentRemove?: (event: ConversationAttachmentEvent) => void; | |
onAttachmentErroroptional | readonly onAttachmentError?: (error: ConversationAttachmentError) => void; | |
toolbaroptional | readonly toolbar?: ReactNode; | Extra controls next to the send button. |
classNameoptional | readonly className?: string; | |
styleoptional | readonly style?: CSSProperties; |