Documentation index for AI agents (llms.txt). Markdown versions of every page are available by appending .md to the page URL. The full corpus is at /llms-full.txt.

ChatInput

ChatInput is the chat kit's composer: an auto-growing textarea plus a send button, wired to the provider out of the box. Enter submits, Shift+Enter breaks the line, and an IME composition session owns Enter until it commits. The send button is disabled while the input is empty or a reply is loading, and shows a Spinner in place of its arrow while loading.

Inside a ChatProvider no props are required - value, change handling, submission, and the loading state all come from the provider:

<ChatProvider onSend={handleSend}>
  <ChatPanel>
    <Transcript />
    <ChatInput $glow />
  </ChatPanel>
</ChatProvider>

Outside a provider (or to intercept it), drive it yourself with value, onValueChange, onSend, and $loading.

The textarea grows with its content up to a cap (160px by default, or $maxRows), then scrolls. At one row it matches the height of Cherry's other form elements.

The glow treatment

$glow opts into the animated treatment: a rotating rainbow border that stands in for the primary color on hover and focus, a soft radiating halo, and a field of floating sparkles while the composer is hovered or focused. The state map mirrors the regular Cherry input - border accent on hover and focus, a ring growing to 4px on focus, held at 2px while pressed. All of it is disabled under prefers-reduced-motion: reduce.

Properties

valuestring

Controlled value. Defaults to the provider's input state.

onValueChange(value: string) => void

Change handler. Defaults to the provider's setInput.

onSend(value: string) => void

Submit handler. Defaults to the provider's send().

$loadingboolean

Overrides the provider's loading state.

$glowboolean

The animated rainbow border and sparkle treatment. Off by default.

$glowColorsstring[]

Overrides the glow palette with your own list of colors.

$maxRowsnumber

Maximum number of rows the textarea may grow to before it scrolls.

placeholderstring

Defaults to "Ask AI Assistant...".

aria-labelstring

Accessible name for the textarea. Defaults to "Ask a question".

All other native textarea attributes (except the controlled value/onChange/onSubmit) pass through, and the ref forwards to the textarea element.