Skip to content

Prompt Input

The composer: Enter sends, Shift+Enter starts a new line. Attach files from the + menu, by pasting or by dropping (images, PDFs and text, up to 1 MB and 4 files). Send becomes Stop while the reply streams.

Sourcecomponents/prompt-input.tsx

Nothing sent yet

Usage

When to use

Use when

The composer of an agent chat: a growing textarea where Enter sends and Shift+Enter is a new line (never during IME composition), files by menu, paste or drop checked against accept/maxFiles/maxFileSize, and a Submit that follows status (Send, Sending, Stop, Retry). onSubmit gets { text, files } in the AI SDK's shape

Don’t use when

A multi-line form field that isn't a chat message (use Textarea); one line with a button in the frame (use Input Group)