Skip to main content

Prompt Input

Write a message with files & a Send that turns into Stop.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
onSubmit(submission: PromptSubmission) => void-Called with the message and its files on Send or Enter.
Called with the message and its files on Send or Enter.
streamingbooleanfalseAn answer is arriving: Send turns into Stop.
An answer is arriving: Send turns into Stop.
onStop() => void-Called from Stop while streaming.
Called from Stop while streaming.
childrenReactNode-Drawn before Send, such as a Model Picker.
Drawn before Send, such as a Model Picker.
placeholderstringAsk anythingThe empty field's hint.
The empty field's hint.
defaultValuestringStarting text.
Starting text.
shapenone | rounded | pillrounded
disabledbooleanfalseTurns the whole input off.
Turns the whole input off.
classNamestring-
focusboolean | stringtrue