easeUI

Prompt Input

A chat composer that grows with its content, submits on Enter, and crossfades its send button into a stop button while a reply streams.

Installation

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

API reference

PropTypeDefaultDescription
value?string-Controlled value.
defaultValue?stringStarting value when uncontrolled. Default "".
onChange?((value: string) => void)--
onSubmit(value: string) => void-Called with the trimmed text on Enter or the send button.
loading?booleanfalseSwaps the send button for a stop button. Default false.
onStop?(() => void)-Called from the stop button while loading.
className?string--

Updated