Skip to content
Twentyfirst UIHalo

Composer

AI · AgentStatus, Composer, PromptStarters, UsageMeter

Message input for agents: grows with the text, attachments, slash commands, a model picker, and Send that turns into Stop while the agent works.

Composer props: value / onChange, onSend(text, attachments), busy, onStop, placeholder, models ({id, label, hint}) + model + onModel, commands ({name, hint, icon, insert}) + onCommand, attachments + onAttach(FileList) + onRemoveAttachment(i), hint, left (extra tools).
Also here: PromptStarters (items {icon, tint, title, text, prompt}, onPick), ModelPicker, AgentStatus (status, step), UsageMeter (used, limit, format, label, caption), AgentMark, TypingDots.

  • Enter sends, Shift+Enter adds a line; typing "/" opens commands (↑ ↓ Enter).
  • Drop files anywhere on the composer to attach them.
  • Stop must always work: cancel streaming and mark running tools as stopped.
  • Show starters only on an empty conversation, three or four, written as things people actually ask.
Q1-report.pdf
Enter to send · Shift+Enter for a new line
IdleDrafts only
Context21k / 200k

Props

AgentStatus

PropTypeNotes
status"Running" | "Thinking" | "Waiting for approval" | "Idle" | "Paused" | "Error" | stringRequired
step?string
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

Composer

PropTypeNotes
value?string
onChange?(v: string) => void
onSend?(text: string, files: (File | { name: string })[]) => void
busy?boolean
onStop?() => void
placeholder?string
label?string
models?ModelOption[]
model?string
onModel?(id: string) => void
commands?ComposerCommand[]
onCommand?(c: ComposerCommand) => void
attachments?(File | { name: string })[]
onAttach?(files: FileList) => void
onRemoveAttachment?(i: number) => void
hint?string
left?ReactNode
disabled?boolean
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

PromptStarters

PropTypeNotes
items{ icon?: IconName; tint?: Tint; title: string; text?: string; prompt?: string }[]Required
onPick?(prompt: string) => void
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

UsageMeter

PropTypeNotes
usednumberRequired
limitnumberRequired
label?string
caption?string
format?(v: number) => string
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.