Prompt Input

Preview

Install

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

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

API Reference

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

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.

Also on React Native. A chat composer with attachments, voice and stop.

Updated