Skip to content

ChatInputProps

Defined in: react/components/controls/chat-input.tsx:8

Props for ChatInput — a chat composer for AI-agent UIs.

optional acceptSuggestionKey?: "right" | "tab" | "ctrl-e"

Defined in: react/components/controls/chat-input.tsx:28

Ghost-text accept key (default “right”).


optional busy?: boolean

Defined in: react/components/controls/chat-input.tsx:14

True while the agent is generating — shows the in-border stop affordance.


optional children?: ReactNode

Defined in: react/components/types.ts:38

Child elements.

ComponentProps.children


optional chipStyle?: "fill" | "bracket"

Defined in: react/components/controls/chat-input.tsx:24

Chip rendering style.


optional className?: string

Defined in: react/components/types.ts:24

Space-separated class names (currently advisory; no CSS cascade).

ComponentProps.className


optional commands?: Command[]

Defined in: react/components/controls/chat-input.tsx:37

Keybinding/palette commands.


optional disabled?: boolean

Defined in: react/components/types.ts:52

Marks the widget (and its descendants) as inert: not focusable, ignores key/mouse input, and interactive controls render in a muted style. A disabled container propagates to every control inside it.

ComponentProps.disabled


optional extraHints?: ChatHint[]

Defined in: react/components/controls/chat-input.tsx:39

Extra host hints always appended to the contextual help line.


optional focusable?: boolean

Defined in: react/components/types.ts:40

Allow this widget to take keyboard focus.

ComponentProps.focusable


optional focusOnClick?: boolean

Defined in: react/components/types.ts:46

When a click lands on this container (its padding, border, or a non-focusable child), move focus to its first focusable descendant — so clicking a Form/Panel/Box hands focus to its first field. Off by default.

ComponentProps.focusOnClick


optional getHistory?: () => string[]

Defined in: react/components/controls/chat-input.tsx:46

App-provided history, pulled lazily for Up/Down recall.

string[]


optional historyEdge?: "row" | "bump"

Defined in: react/components/controls/chat-input.tsx:33

When Up/Down recall history. “bump” (default): only at the buffer’s true start/end (never mid-edit). “row”: eager — anywhere on the first/last row.


optional hoverInterest?: boolean

Defined in: react/components/types.ts:66

Opt-in hint that this widget cares about passive hover movement.

ComponentProps.hoverInterest


optional id?: string

Defined in: react/components/types.ts:22

Stable identifier, handy for tests and lookups.

ComponentProps.id


optional label?: string

Defined in: react/components/types.ts:36

Structural/accessible label (also the tab title inside TabContainer).

ComponentProps.label


optional maxRows?: number

Defined in: react/components/controls/chat-input.tsx:20

Maximum visible rows before the content scrolls.


optional minRows?: number

Defined in: react/components/controls/chat-input.tsx:18

Minimum visible rows.


optional onChange?: (value) => void

Defined in: react/components/controls/chat-input.tsx:50

Called on every edit with the new value.

string

void


optional onClick?: (ev) => void

Defined in: react/components/types.ts:54

Pointer click.

any

void

ComponentProps.onClick


optional onCommand?: (name, args?) => void

Defined in: react/components/controls/chat-input.tsx:56

Called when a trigger/command resolves to an action.

string

unknown

void


optional onDragEnd?: (x, y, moved) => void

Defined in: react/components/types.ts:72

Drag released; moved is false for a tap with no movement.

number

number

boolean

void

ComponentProps.onDragEnd


optional onDragMove?: (x, y) => void

Defined in: react/components/types.ts:70

Pointer moved while dragging from this widget.

number

number

void

ComponentProps.onDragMove


optional onDragStart?: (x, y) => void

Defined in: react/components/types.ts:68

Pointer-drag lifecycle; moved is false for a tap with no movement.

number

number

void

ComponentProps.onDragStart


optional onHintsChange?: (hints) => void

Defined in: react/components/controls/chat-input.tsx:58

Called when the contextual hint set changes (render a help line).

ChatHint[]

void


optional onInterrupt?: () => void

Defined in: react/components/controls/chat-input.tsx:54

Called when the user interrupts a busy agent (Esc / stop glyph).

void


optional onKey?: (ev) => void

Defined in: react/components/types.ts:58

Key event while focused; set ev.handled to consume it.

any

void

ComponentProps.onKey


optional onMouseDown?: (ev) => void

Defined in: react/components/types.ts:56

Pointer pressed (any button); the event carries button and x/y.

any

void

ComponentProps.onMouseDown


optional onMouseEnter?: (ev) => void

Defined in: react/components/types.ts:62

Pointer entered this widget’s region.

any

void

ComponentProps.onMouseEnter


optional onMouseLeave?: (ev) => void

Defined in: react/components/types.ts:64

Pointer left this widget’s region.

any

void

ComponentProps.onMouseLeave


optional onScroll?: (ev) => void

Defined in: react/components/types.ts:60

Wheel / scroll event.

any

void

ComponentProps.onScroll


optional onSubmit?: (value, attachments) => void

Defined in: react/components/controls/chat-input.tsx:52

Called when the user sends a turn.

string

Attachment[]

void


optional placeholder?: string

Defined in: react/components/controls/chat-input.tsx:12

Hint shown when empty.


optional ref?: Ref<Widget>

Defined in: react/components/types.ts:30

Captures the underlying widget instance (React 19 ref-as-prop). Defaults to the base Widget; narrow it with a cast when you need a subclass field, e.g. ref={inputRef as React.Ref<InputWidget>}.

ComponentProps.ref


optional serialize?: ChipSerializer

Defined in: react/components/controls/chat-input.tsx:48

How a chip serializes into the submitted string.


optional showActionGlyph?: boolean

Defined in: react/components/controls/chat-input.tsx:26

Show the in-border send/stop glyph (default true; keyboard always works).


optional softWrap?: boolean

Defined in: react/components/controls/chat-input.tsx:22

Wrap long lines (default true).


optional style?: WidgetStyles

Defined in: react/components/types.ts:32

Inline styles for this widget — see the Styling guide.

ComponentProps.style


optional submitMode?: "enter" | "modifier-enter"

Defined in: react/components/controls/chat-input.tsx:16

Enter sends (“enter”, default) or Mod+Enter sends (“modifier-enter”).


optional suggestionProvider?: (ctx) => string | Promise<string | null> | null

Defined in: react/components/controls/chat-input.tsx:41

App-provided inline ghost-text autocomplete.

number

string

string | Promise<string | null> | null


optional theme?: string

Defined in: react/components/types.ts:34

Re-theme this subtree; descendants resolve $tokens against it.

ComponentProps.theme


optional triggers?: Trigger[]

Defined in: react/components/controls/chat-input.tsx:35

Character-triggered completion sources (slash, mention, …).


optional value?: string

Defined in: react/components/controls/chat-input.tsx:10

Current text (controlled; setting it does not re-emit onChange).