Conversation core
Prompt input
Use when people start work by typing a request, and need to attach a file, pick a model or stop an answer from the same place.
The composer: attachments, model pill, and a stop-while-streaming state.
Part of Conversation core. The first thing you build: a place to ask and a place to read the answer. Every AI product ships these surfaces, so users compare yours with the best they have used. The work here is in the details: what the composer does mid-answer, how a reply arrives, what you can do with it afterwards.
Do
- Turn send into stop while the agent is answering. It is the same button, in the same place.
- Offer a few starting prompts above the composer. They fill the field and leave the user to press send.
- Let the field grow with the text up to a limit, then scroll.
Don't
- Don't disable the whole composer while the agent answers. Stopping has to stay one tap away.
- Don't hide the model behind settings if the choice changes cost, speed or quality.
- Don't send on a suggestion tap. Filling the field lets people edit first.
States
- Empty: Starting prompts sit above the field, the placeholder shows, and the send button is muted.
- Typing: The field takes a focus border and grows with its content. The send button turns to the accent once there is text.
- File attached: A file chip with name, size and a remove control appears above the text.
- Model menu open: The model pill opens a menu above the composer, each model with a one-line description and capability tags. The current one is ticked.
- Answering: The field clears, send becomes a stop square, and the hint line changes to "Alpha is answering". Pressing stop returns to empty.
Usage
import { PromptInputPattern } from "./halaska-kit";
<PromptInputPattern />
Built from
Stack, Thinking Indicator, Typography
Related patterns
Command search, Model & context
Halaska UI · Components · Patterns · Screens · Install