
Files Table
Tables
Search by name, tag, category or type
Source and install need .
pnpm dlx shadcn@latest add @assembli/chat-attachmentsChat composer attachments: drop files anywhere on it for a dashed drop overlay, pick them with the paperclip or paste images. Each file becomes a tile above the field: image thumbnails, document tiles with type and pages or rows, an upload ring, a short reading state, and errors with Retry. Remove closes the gap, the footer estimates context use, and Send waits for uploads.
Other props pass through to the root element.
files
ChatAttachment[]
defaultFiles
ChatAttachment[]
Default []
onFilesChange
(files: ChatAttachment[]) => void
accept
string
Same syntax as an input's accept: ".pdf,image/*,text/csv".
maxSize
number
Default 20 * 1024 * 1024
Bytes. Defaults to 20 MB.
maxFiles
number
Default 10
upload
AttachmentUploader
Without one, files are ready as soon as they're added.
onSend
(text: string, files: ChatAttachment[]) => void
placeholder
string
Default "Ask about these files…"
| Description | |||
|---|---|---|---|
| files | ChatAttachment[] | – | |
| defaultFiles | ChatAttachment[] | [] | |
| onFilesChange | (files: ChatAttachment[]) => void | – | |
| accept | string | – | Same syntax as an input's accept: ".pdf,image/*,text/csv". |
| maxSize | number | 20 * 1024 * 1024 | Bytes. Defaults to 20 MB. |
| maxFiles | number | 10 | |
| upload | AttachmentUploader | – | Without one, files are ready as soon as they're added. |
| onSend | (text: string, files: ChatAttachment[]) => void | – | |
| placeholder | string | "Ask about these files…" |