AI Native UI Kit
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.json

Usage

import { AttachmentComposer } from "@/components/ui/attachment-composer";

<AttachmentComposer
  onSend={(text, files) => submit(text, files)}
  onAttach={(files) => upload(files)}
/>;

Props

PropTypeDescription
placeholderstringInput placeholder.
defaultAttachmentsAttachment[]Initial file chips.
onSend(text: string, attachments: Attachment[]) => voidFires on submit.
onAttach(files: FileList | null) => voidFires when files are picked.

On this page