Components
Attachment Composer
A composer that shows attached files as removable chips.
FinalContract.pdf
Add photos & files
Installation
npx shadcn@latest add https://ai-native-ui.com/r/attachment-composer.jsonUsage
import { AttachmentComposer } from "@/components/ui/attachment-composer";
<AttachmentComposer
onSend={(text, files) => submit(text, files)}
onAttach={(files) => upload(files)}
/>;Props
| Prop | Type | Description |
|---|---|---|
placeholder | string | Input placeholder. |
defaultAttachments | Attachment[] | Initial file chips. |
onSend | (text: string, attachments: Attachment[]) => void | Fires on submit. |
onAttach | (files: FileList | null) => void | Fires when files are picked. |