# AttachmentPrimitive URL: /docs/api-reference/primitives/Attachment Components for displaying and managing file attachments in messages and composer. *** title: AttachmentPrimitive description: Components for displaying and managing file attachments in messages and composer. ---------------------------------------------------------------------------------------------- Buttons to interact with attachments. import { ParametersTable } from "@/components/docs/tables/ParametersTable"; import { DataAttributesTable } from "@/components/docs/tables/DataAttributesTable"; import { Code } from "@radix-ui/themes"; **Dual Use!** Attachments can appear in both messages and composers. ## Anatomy ```tsx import { AttachmentPrimitive } from "@assistant-ui/react"; const MyMessageAttachment = () => ( ); const MyComposerAttachment = () => ( ); ``` ## API Reference ### Container Containts all parts of the attachment. This primitive renders a `
` element unless `asChild` is set. ### Thumbnail The thumbnail of the attachment. This primitive renders a `
` element unless `asChild` is set. ### Name The name of the attachment. This primitive renders a `
` element unless `asChild` is set. ### Remove Removes the attachment. This primitive renders a `