Browse components
Prompt Input
Chat composer for AI apps: an auto-growing textarea that submits on Enter (Shift+Enter for newlines), a footer/header tools row, an attachment action menu (add files, take screenshot), model select, hover-card and command-palette slots, and a submit button that turns into a stop button while submitted or streaming when onStop is provided. Handles file attachments via drag-drop, paste, and file dialog with accept/maxFiles/maxFileSize validation, converts blob URLs to data URLs on submit, and can lift its state into an optional PromptInputProvider. Use it as the input at the bottom of any AI SDK useChat conversation. Composes input-group, dropdown-menu, select, tooltip, hover-card, command, spinner.
pnpm dlx shadcn@latest add @uifiles/prompt-input
Ready
Type, attach files from the menu, pick a model, then submit with Enter. A suggestion fills the draft; an empty submit is swallowed.
Streaming
While a response is in flight the submit button becomes Stop and the draft stays put.