Skip to content
Get Pro

Prompt Input

An auto-growing agent composer with attachment, model, submit, and stop controls.

Installation

Add the component source directly to your project.

pnpm dlx shadcn@latest add https://pastaui.com/r/prompt-input.json

API reference

Prompt Input

Prompt Input properties
PropTypeDefaultDescription
onToolSelect(tool: PromptTool) => voidHandles the plus-menu actions. Connect library, image, search, maps, research, sketch, visualization, and platform tools in your app.
onFilesChange(files: File[]) => voidReceives locally selected files. Files are included in the submit selection; upload them in your app.
models / moreModelsModelOption[]OpenAI and Claude modelsConfigures the embedded Model Picker options and More models submenu.
onModelChange(model: string) => voidReceives model selections.
effort / onEffortChangeModelEffort / (effort: ModelEffort) => voidmedium / —Controls reasoning effort in the embedded picker.
onSubmit(value: string, selection: { model: string; effort: ModelEffort; tool?: PromptTool; files: File[] }) => voidReceives a trimmed prompt, selected model and effort, active tool, and local files.
pendingbooleanfalseChanges the submit action into a stop control.
modelstringFirst available modelControls the selected model ID.