AI Chat Input
AI chat composer with auto-grow, attachments, model picker and Enter to send.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
AIChatInputProps
Also accepts all props of Omit<React.ComponentProps<"form">, "onSubmit">
| Prop | Type | Default | Description |
|---|---|---|---|
| onSubmit* required | (submission: ChatSubmission) => void | — | — |
| models | string[] | ["Claude Opus 5", "Claude Sonnet 5", "Claude Haiku 4.5"] | — |
| placeholder | string | "Ask anything…" | — |
| loading | boolean | false | Shows a stop button instead of send while a response streams |
| onStop | () => void | — | — |
| maxHeight | number | 200 | Max textarea height in px before it scrolls |
Install
$ npx shadcn@latest add https://chromotion.dev/r/ai-chat-input.jsonThe CLI installs the base component; your customizations live in the code generated on the Customize tab.