PromptInput
Auto-growing prompt textarea with a submit/stop button, optional attachment controls, and a toolbar slot (model/effort selectors). Enter submits; Shift+Enter inserts a newline; while streaming the button becomes a stop control.
Import
Section titled “Import”import { PromptInput } from "@flanksource/clicky-ui/chat";The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
acceptedMediaTypes |
string[] |
— | — |
allowSubmitWhileStreaming |
boolean |
false |
— |
attachmentLimits |
AttachmentLimits |
— | — |
attachmentUpload |
AttachmentUploadAdapter |
— | — |
className |
string |
— | — |
disabled |
boolean |
false |
— |
disabledReason |
string |
— | Why the input is disabled. Shown in place of the placeholder (and as the tooltip) while `disabled`, so a locked input says why instead of just looking dead. Ignored while enabled. |
draft |
{ id: number; text: string; } | null |
— | Text to seed the composer with, without submitting it. A new `id` re-seeds even when the text repeats, so picking the same suggestion twice works. |
enableAttachments |
boolean |
false |
Enables the attachment button and chips. |
inputAccessory |
ReactNode |
— | Compact host control rendered beside the textarea and submit button. |
onStop |
(…) => … |
— | Called when the user stops an in-flight generation. |
onSubmit* |
(…) => void |
— | Called with the trimmed text and any attachments when the user submits. |
placeholder |
string |
What would you like to know? |
— |
status |
enum |
— | Current chat status; drives the submit/stop button affordance. |
stopLabel |
string |
Stop |
— |
toolbar |
ReactNode |
— | Toolbar content (e.g. model/effort selectors) rendered in the footer. |