Prompt Input

An auto-growing agent composer with prompt actions, model selection, keyboard submission, and animated send and stop states.

Preview

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/prompt-input

API Reference

value?
string
defaultValue?
string
onValueChange?
((value: string) => void)
models?
PromptModel[]
[]
model?
string
defaultModel?
string
onModelChange?
((model: string) => void)
actions?
PromptAction[]
[]
onAction?
((action: string) => void)
onSubmit?
((value: string, model?: string) => void | Promise<void>)
loading?
boolean
false
onStop?
(() => void)
minRows?
number
2
maxRows?
number
8
leadingAction?
ReactNode
className?
string

Composition

Place the prompt beside the transcript so drafting never becomes part of the scrolling message history.

Chat
├── MessageScroller
│   └── MessageGroup
└── PromptInput

Note: Message Scroller keeps the conversation stable around the composer. Tool Approval temporarily replaces freeform input with scoped permission. Approval Card collects structured human input during a paused run.

How it works

The composer is the handoff point between a person and an agent. It should keep the current instruction editable, make available capabilities discoverable, and clearly separate sending from stopping active work.

Updated