About
A file attachment row for uploads, chats, and media previews, showing a file icon or image thumbnail, name, size, upload status/progress, and retry, download, or remove actions.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Attachment to your project and fits it to your theme.
Code
How Attachment is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Attachment } from "@/components/ui/attachment";
export default function AttachmentDemo() {
return (
<div className="flex w-full max-w-sm flex-col gap-3 p-6">
<Attachment
variant="upload"
fileName="quarterly-report.pdf"
status="uploading"
progress={62}
/>
<Attachment
variant="removable"
fileName="team-photo.png"
fileSize={2_400_000}
status="success"
/>
<Attachment
variant="download"
fileName="invoice-0913.csv"
fileSize={"84 KB"}
status="idle"
/>
</div>
);
}








