ChatInputProps
Configures a controlled or local message draft, submission and stop callbacks, and composer labels.
import type { ChatInputProps } from '@threadplane/react/chat';Declaration
export interface ChatInputProps {
readonly attachments?: ReactNode;
readonly banner?: ReactNode;
readonly busy?: boolean;
readonly className?: string;
readonly defaultValue?: string;
readonly disabled?: boolean;
readonly footer?: ReactNode;
readonly hint?: ReactNode;
readonly id?: string;
readonly label?: string;
readonly leading?: ReactNode;
readonly onStop?: () => void;
readonly onSubmit: (text: string) => boolean | void;
readonly onValueChange?: (value: string) => void;
readonly placeholder?: string;
readonly runningHint?: boolean | string;
readonly submitOnEnter?: boolean;
readonly trailing?: ReactNode;
readonly value?: string;
}Members
attachments
App-owned content between the banner and the input surface, such as files chosen for the next message. The composer never reads, sends or clears it.
readonly attachments?: ReactNode;banner
App-owned notice above the input surface, such as a paused or read-only
state. Announce it yourself when it should be spoken, for example with
role="status".
readonly banner?: ReactNode;busy
readonly busy?: boolean;className
readonly className?: string;defaultValue
readonly defaultValue?: string;disabled
readonly disabled?: boolean;hint
readonly hint?: ReactNode;id
readonly id?: string;label
readonly label?: string;leading
App-owned content before the draft, inside the input surface. Slot content
sits inside the composer form: give its buttons type="button" unless they
should send, and it stays enabled when disabled or busy is set.
readonly leading?: ReactNode;onStop
readonly onStop?: () => void;onSubmit
Receives the draft as typed (trim only gates emptiness). Return false to keep it.
readonly onSubmit: (text: string) => boolean | void;onValueChange
readonly onValueChange?: (value: string) => void;placeholder
readonly placeholder?: string;runningHint
Explains a send that did nothing: pressing Enter with a draft while busy
keeps the draft, and a status region below the input says a response is
still running until it ends or the draft is cleared. true uses the
default sentence and a string replaces it. Off unless set.
readonly runningHint?: boolean | string;submitOnEnter
Enter sends and Shift+Enter adds a line. Ctrl/⌘+Enter always sends.
readonly submitOnEnter?: boolean;trailing
App-owned controls between the draft and the built-in Stop and Send.
readonly trailing?: ReactNode;value
readonly value?: string;