Prompt Input
Chat input that submits on Enter, expands as the draft gets longer, and swaps Send for Stop during a response.
Paste this into your agent.
Prompt Input is the message field at the bottom of a chat or AI assistant, with room for attachments, an attach button and model or effort pickers. It uses the AI SDK's status words, so useChat state passes in unchanged.
Install
bashnpx shadcn@4.18.0 add @siteplane/prompt-input
Import it from @/siteplane/components/prompt-input. The project needs Siteplane UI's one-time setup first: .
When to pick it
- vs : Pick Textarea for an ordinary multi-line form field that is submitted with the rest of a form.
- vs : Use Attachment cards inside it for files in the draft.
- vs : Pair it with Message Scroller above for the thread.
Rules
- Handle
onSubmit, which receives the trimmed text, then add the message to your thread yourself. - Pass
status(ready,submitted,streaming,error) andonStopso Send becomes Stop while a reply runs. - Compose
PromptInputTextarea,PromptInputToolbarwithPromptInputToolbarGroup,PromptInputAttachButtonandPromptInputSubmit. - Use
submitOnEnter="desktop"when phone users should get new lines from Enter. - Set
allowEmptyonly while the draft holds a file that is ready to send, and translate the built-in names throughlabels. - Give the field an accessible name; placeholder text does not count as a label.
Reference
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
Accessible Focus Statesby UI Skillbook
Keep a visible, high-contrast focus indicator on every interactive element, without a generic browser outline or none at all.
Accessibility
Better Accessibilityby jakubkrehel
Review and improve focus states, keyboard support, ARIA, forms, screen readers, hit areas, and motion accessibility.
AccessibilityExternalGitHub stars: 9.2K
Build Primitiveby PrototyperAI
Build foundational UI primitives from scratch with strong ARIA, keyboard, focus, and state handling.
AccessibilityExternalGitHub stars: 7
Form Field Validation Timingby UI Skillbook
Validate at the right moment — not on every keystroke, not only on submit.
Forms