提示输入

New

可自动增高的 Agent 输入台:动作菜单、模型选择、Enter 发送、多行输入,以及发送/停止的动效切换。

安装

用 shadcn CLI 添加,或手动复制源码。

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

API 参考

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

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.