# AttachmentPrimitive
URL: /docs/api-reference/primitives/attachment
Components for displaying and managing file attachments in messages and composer.
Buttons to interact with attachments.
**Dual Use!** Attachments can appear in both messages and composers.
Anatomy \[#anatomy]
```tsx
import { AttachmentPrimitive } from "@assistant-ui/react";
const MyMessageAttachment = () => (
);
const MyComposerAttachment = () => (
);
```
API Reference \[#api-reference]
Root \[#root]
Contains all parts of the attachment.
This primitive renders a `
` element unless `asChild` is set. Accepts all standard HTML div element props.
unstable\_Thumb \[#unstable\_thumb]
The thumbnail of the attachment.
This primitive renders a `
` element unless `asChild` is set. Accepts all standard HTML div element props.
Name \[#name]
The name of the attachment.
This primitive renders a text node with the attachment's file name. It accepts no props.
Remove \[#remove]
Removes the attachment.
This primitive renders a `