InputMessage
Chat-style message composer with an auto-resizing textarea, flexible left/right action slots, and a built-in send button on a Surface-2 substrate.
Installation
Install InputMessage from the Fluid Effect UI registry.
Basic
Suggestions
Suggested prompt: Why is every other input box so stiff?. Press Tab to fill the composer.
Attachments
Caller-owned attachment previews, a keyboard-accessible picker, and a transcript that retains sent messages.
Queued messages
Stream, queue, edit, reorder, remove and stop. Queue dispatch remains caller-owned.
Help me polish the dashboard design
Thinking…
Transcript
Send a message to try a streaming reply, then scroll away and jump back to the latest line.
Suggested prompt: How does the scrolling work?. Press Tab to fill the composer.
Left Slot Only
Right Slot Only
Send Handler
Disabled
API Reference
Types come from the public API. A dash indicates no default is documented here.
InputMessage props
Public source| Prop | Type | Default | Description |
|---|---|---|---|
key | KeepAliveKey<K, Ends> | undefined | '' | The child's identity among its parent's children of one component, or a kept child's among its author's. The empty string by default. |
onEmit | Show type((events: { readonly _tag: "Focused"; } | { readonly _tag: "Blurred"; } | { readonly _tag: "ValueChanged"; readonly value: string; } | { readonly _tag: "FilesPicked"; readonly files: readonly File[]; } | { readonly _tag: "FilesRejected"; readonly reason: "too-many-files" | "invalid-type"; } | { readonly _tag: "RemoveFileRequested"; readonly id: string; } | { readonly _tag: "Sent"; readonly text: string; readonly files: readonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[]; readonly queuedId: string | null; } | { readonly _tag: "QueueRequested"; readonly text: string; readonly files: readonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[]; } | { readonly _tag: "Stopped"; } | { readonly _tag: "EditQueuedRequested"; readonly id: string; } | { readonly _tag: "RemoveQueuedRequested"; readonly id: string; } | { readonly _tag: "MoveQueuedRequested"; readonly id: string; readonly direction: 1 | -1; }) => NoInfer<Msg> | undefined) | { readonly ValueChanged: (event: { readonly _tag: "ValueChanged"; readonly value: string; }) => NoInfer<Msg> | undefined; readonly FilesPicked: (event: { readonly _tag: "FilesPicked"; readonly files: readonly File[]; }) => NoInfer<Msg> | undefined; readonly FilesRejected: (event: { readonly _tag: "FilesRejected"; readonly reason: "too-many-files" | "invalid-type"; }) => NoInfer<Msg> | undefined; readonly RemoveFileRequested: (event: { readonly _tag: "RemoveFileRequested"; readonly id: string; }) => NoInfer<Msg> | undefined; readonly Sent: (event: { readonly _tag: "Sent"; readonly text: string; readonly files: readonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[]; readonly queuedId: string | null; }) => NoInfer<Msg> | undefined; readonly QueueRequested: (event: { readonly _tag: "QueueRequested"; readonly text: string; readonly files: readonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[]; }) => NoInfer<Msg> | undefined; readonly Stopped: (event: { readonly _tag: "Stopped"; }) => NoInfer<Msg> | undefined; readonly EditQueuedRequested: (event: { readonly _tag: "EditQueuedRequested"; readonly id: string; }) => NoInfer<Msg> | undefined; readonly RemoveQueuedRequested: (event: { readonly _tag: "RemoveQueuedRequested"; readonly id: string; }) => NoInfer<Msg> | undefined; readonly MoveQueuedRequested: (event: { readonly _tag: "MoveQueuedRequested"; readonly id: string; readonly direction: 1 | -1; }) => NoInfer<Msg> | undefined; readonly Focused: (event: { readonly _tag: "Focused"; }) => NoInfer<Msg> | undefined; readonly Blurred: (event: { readonly _tag: "Blurred"; }) => NoInfer<Msg> | undefined; } | undefined | — | Handle the child's events with a callback, or supply one handler per tag for tagged events. Return a parent message to dispatch it, or `undefined` to ignore the event. |
props.id | string | Required | |
props.value | string | Required | |
props.disabled | boolean | false | |
props.size | "default" | "compact" | 'default' | |
props.className | string | — | |
props.shape | "rounded" | "pill" | "sharp" | — | |
props.placeholder | string | 'Ask me anything…' | |
props.queue | Show typereadonly { readonly id: string; readonly text: string; readonly files: readonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[]; }[] | [] | |
props.status | "idle" | "streaming" | — | |
props.multiple | boolean | true | |
props.accept | readonly string[] | ['image/png', 'image/jpeg', 'application/pdf'] | |
props.actionSlots | boolean | — | |
props.files | Show typereadonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[] | [] | |
props.supportsQueue | boolean | — | |
props.supportsStop | boolean | — | |
props.supportsFiles | boolean | — | |
props.showQueue | boolean | — | |
props.fileTrigger | "visible" | "focus-only" | — | |
props.placeholderSuggestion | string | — | |
props.suggestions | readonly string[] | [] | |
props.textareaLabel | string | 'Message' | |
props.textareaDescribedBy | string | — | |
props.textareaClassName | string | — | |
props.sendLabel | string | 'Send' | |
props.minRows | number | 1 | |
props.liveMessage | string | '' | |
slots | SC & CheckedSlots<"left" | "right", SC, NoInfer<Msg>> | — |
InputMessageWithActions
Public source
| Prop | Type | Default | Description |
|---|---|---|---|
key | string | undefined | '' | The child's identity among its parent's children of one component. The empty string by default. |
onEmit | Show type((events: { readonly _tag: "Focused"; } | { readonly _tag: "Blurred"; } | { readonly _tag: "ValueChanged"; readonly value: string; } | { readonly _tag: "FilesPicked"; readonly files: readonly File[]; } | { readonly _tag: "FilesRejected"; readonly reason: "too-many-files" | "invalid-type"; } | { readonly _tag: "RemoveFileRequested"; readonly id: string; } | { readonly _tag: "Sent"; readonly text: string; readonly files: readonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[]; readonly queuedId: string | null; } | { readonly _tag: "QueueRequested"; readonly text: string; readonly files: readonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[]; } | { readonly _tag: "Stopped"; } | { readonly _tag: "EditQueuedRequested"; readonly id: string; } | { readonly _tag: "RemoveQueuedRequested"; readonly id: string; } | { readonly _tag: "MoveQueuedRequested"; readonly id: string; readonly direction: 1 | -1; }) => NoInfer<Msg> | undefined) | { readonly ValueChanged: (event: { readonly _tag: "ValueChanged"; readonly value: string; }) => NoInfer<Msg> | undefined; readonly FilesPicked: (event: { readonly _tag: "FilesPicked"; readonly files: readonly File[]; }) => NoInfer<Msg> | undefined; readonly FilesRejected: (event: { readonly _tag: "FilesRejected"; readonly reason: "too-many-files" | "invalid-type"; }) => NoInfer<Msg> | undefined; readonly RemoveFileRequested: (event: { readonly _tag: "RemoveFileRequested"; readonly id: string; }) => NoInfer<Msg> | undefined; readonly Sent: (event: { readonly _tag: "Sent"; readonly text: string; readonly files: readonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[]; readonly queuedId: string | null; }) => NoInfer<Msg> | undefined; readonly QueueRequested: (event: { readonly _tag: "QueueRequested"; readonly text: string; readonly files: readonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[]; }) => NoInfer<Msg> | undefined; readonly Stopped: (event: { readonly _tag: "Stopped"; }) => NoInfer<Msg> | undefined; readonly EditQueuedRequested: (event: { readonly _tag: "EditQueuedRequested"; readonly id: string; }) => NoInfer<Msg> | undefined; readonly RemoveQueuedRequested: (event: { readonly _tag: "RemoveQueuedRequested"; readonly id: string; }) => NoInfer<Msg> | undefined; readonly MoveQueuedRequested: (event: { readonly _tag: "MoveQueuedRequested"; readonly id: string; readonly direction: 1 | -1; }) => NoInfer<Msg> | undefined; readonly Focused: (event: { readonly _tag: "Focused"; }) => NoInfer<Msg> | undefined; readonly Blurred: (event: { readonly _tag: "Blurred"; }) => NoInfer<Msg> | undefined; } | undefined | — | Handle the child's events with a callback, or supply one handler per tag for tagged events. Return a parent message to dispatch it, or `undefined` to ignore the event. |
props.id | string | Required | |
props.value | string | Required | |
props.disabled | boolean | false | |
props.size | "default" | "compact" | 'default' | |
props.className | string | — | |
props.shape | "rounded" | "pill" | "sharp" | — | |
props.placeholder | string | 'Ask me anything…' | |
props.queue | Show typereadonly { readonly id: string; readonly text: string; readonly files: readonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[]; }[] | [] | |
props.status | "idle" | "streaming" | — | |
props.multiple | boolean | true | |
props.accept | readonly string[] | ['image/png', 'image/jpeg', 'application/pdf'] | |
props.actionSlots | boolean | — | |
props.files | Show typereadonly { readonly id: string; readonly size: number; readonly name: string; readonly type: string; readonly lastModified: number; readonly previewUrl?: string; }[] | [] | |
props.supportsQueue | boolean | — | |
props.supportsStop | boolean | — | |
props.supportsFiles | boolean | — | |
props.showQueue | boolean | — | |
props.fileTrigger | "visible" | "focus-only" | — | |
props.placeholderSuggestion | string | — | |
props.suggestions | readonly string[] | [] | |
props.textareaLabel | string | 'Message' | |
props.textareaDescribedBy | string | — | |
props.textareaClassName | string | — | |
props.sendLabel | string | 'Send' | |
props.minRows | number | 1 | |
props.liveMessage | string | '' | |
slots | { readonly left?: View.Input<Msg, R>; readonly right?: View.Input<Msg, R>; } | Required |

