ChatInput
A message composer with an auto-resizing textarea, an emoji picker, and file attachments — Enter sends, Shift+Enter for a newline.
<UiChatInput />Model value
modelValue is the draft text, bound with v-model. Enter sends and Shift+Enter adds a newline; on send the component clears the draft for you and hands the content to the send event, so you never have to reset it yourself.
Attachments
attachments is the list of pending files, shown as removable chips above the textarea. Bind it with v-model:attachments when you want to add files from outside the composer — a drop zone elsewhere on the page — and, like the draft, it's cleared for you once the message is sent.
Placeholder
placeholder is the hint in the empty textarea, “Message...” by default. Naming the room or the person — “Message #design” — is what most chat apps do, and it doubles as a reminder of where the message is about to go.
Disabled
disabled locks the textarea and every button in the composer, for while a send request is outstanding.
Loading
loading swaps the send button's icon for a spinner and disables it, for while a previous message is still in flight.
Variant
variant picks between the ringed outline composer and the filled, ringless soft one. Reach for soft when the composer sits inside a card that already has its own border.
Color
color only tints the send button. The composer's own ring and background stay neutral regardless, so the accent lands on the one thing you click.
Allow attachments
allowAttachments shows the paperclip that opens the native file picker, and is on by default. Turn it off wherever files have nowhere to go — a comment box, a support widget — rather than accepting them and dropping them silently.
Allow emojis
allowEmojis shows the emoji button, which opens a picker that inserts into the draft at the cursor. It's on by default; turning both this and allowAttachments off leaves the plain text composer below.
Multiple
multiple decides whether the file picker takes more than one file at a time, and is on by default. Set it false where the message can only carry one thing — an avatar upload, a single receipt — so the constraint is enforced in the dialog rather than explained afterwards.
Accept
accept is the comma-separated list of types the file picker offers, passed straight to the underlying file input — MIME types like image/* or extensions like .pdf. It filters the dialog rather than validating the result, so still check what arrives.
Max rows
maxRows is how tall the textarea grows before it starts scrolling instead, six rows by default. Lower it where the composer sits in a tight panel and a long draft would push the conversation off the screen.
API Reference
Generated from the component's source — props, slots and emits as the component actually declares them.
Props
File[][]booleanfalse"neutral" | "primary" | "secondary" | "success" | "error" | "warning" | "info" | "pending"'primary'booleantruestringSlots
actionsEmits
update:modelValue[value: string]update:attachments[files: File[]]send[payload: { content: string; attachments: File[] }]remove-attachment[file: File, index: number]Types
type Variant = "outline" | "soft";type Color = "neutral" | "primary" | "secondary" | "success" | "error" | "warning" | "info" | "pending";