Chat Input

An IME-safe composer with controlled text, attachments, sending and cancellation.

Chat Input

Default

Use v-model for text and loading for an active response. Sending does not clear the draft automatically. The add action opens a native file picker. Bind v-model:attachments for image previews and removal, and v-model:model with models for concrete model profiles. Bind v-model:fast for the lightning toggle and v-model:reasoning for reasoning effort. The settings panel shows supported capabilities; its bubbles-textured progress track supports dragging and keyboard control; only the active effort label is displayed. Empty drafts show Voice; text or attachments switch to Send. Dictation requires browser support and microphone permission, or you can provide transcribe for your own service. Enter sends, Shift+Enter inserts a newline, and IME composition never sends.

models accepts []: value identifies the backend model, label names it, and group configures list sections. capabilities.fast declares Fast support. capabilities.reasoning.options orders model-specific value/label pairs from lower to higher effort; default selects the default value. Omitting reasoning hides the slider and clears its value. Switching models preserves a supported value, otherwise uses the default or first option; unsupported Fast mode turns off. Example capabilities demonstrate the interaction; applications should use their own model catalog for actual capabilities.

API

PROPS

Property
Type
Description
default
Example
More
v-model:fast
Boolean
Fast mode, shown only for models that support it.
false
v-model:reasoning
String
Controlled reasoning effort; switching models falls back to a supported option.
—
v-model:attachments
[]
Controlled attachments. Raw File objects stay in file and images receive previews.
[]
v-model:model
String
Controlled model value.
—
models
[]
Model options with labels, image icon URLs and disabled entries.
[]
file-picker
Boolean
Use SUpload.pick on the add action. Disable to handle selection through attach.
true
accept
String
Accepted file types for native selection and validation.
—
file-limit-size
Number
Maximum file size in MB.
—
voice-input
Boolean
Show dictation and the empty-draft voice action.
true
speech-language
String
Recognition language such as en-US; defaults to the page language.
—
transcribe
Custom transcription service receiving an AbortSignal and returning text; overrides browser recognition.
—
v-model
String
Controlled draft text.
''
placeholder
String
Input hint with a localized default.
—
label
String
Accessible name, with a localized default.
—
disabled
Boolean
Disable component actions.
false
loading
Boolean
Show busy feedback and block normal actions. Chat Input keeps Stop available.
false
submit-on-enter
Boolean
Enter sends, Shift+Enter inserts a newline. Ctrl/Command+Enter also sends. Composition events never send.
true
max-length
Number
Maximum input length, forwarded to STextarea.
—

EVENTS

Event
Type
Description
default
Example
More
update:fast
(value: boolean) => void
Requests a Fast mode change.
—
—
update:reasoning
(value: string) => void
Requests a reasoning effort change.
—
—
update:attachments
(attachments: []) => void
Request an attachment update.
—
—
update:model
(model: string) => void
Request a model change.
—
—
files-selected
(files: File[]) => void
Native selection succeeded; the component does not upload files.
—
—
file-error
(error: unknown) => void
File picking or validation failed.
—
—
voice-start
() => void
Voice input started.
—
—
voice-end
() => void
Voice input ended or was cancelled.
—
—
voice-error
(error: unknown) => void
Recognition is unavailable or failed.
—
—
update:modelValue
(text: string) => void
Controlled model update requested.
—
—
submit
(text: string, attachments: []) => void
Validated content submitted.
—
—
stop
() => void
Stop the active response.
—
—
attach
() => void
Emitted on the add action. Set file-picker=false to provide your own picker.
—
—
remove-attachment
(attachment: ) => void
Remove the selected attachment.
—
—

SLOTS

Slot
Scope
Description
default
Example
More
default
—
Replace the default content.
—
—
attachments
{ attachments: [] }
Customize attachment presentation.
—
—
tools
—
Add tools alongside built-in model selection and voice input.
—
—

EXPOSES

Method
Type
Description
default
Example
More
startVoice
() => Promise<void>
Start or toggle voice input.
—
—
stopVoice
() => void
Stop and cancel current voice input.
—
—
focus
() => void
Component-owned focus access.
—
—
submit
() => void
Component-owned submit access.
—
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied