Wensity Labs

Attachment

Component 13

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>
  );
}

Dependencies

More by Wensity Labs

View all
  • Sidebar

    Sidebar

    234
  • Calendar

    Calendar

    173
  • Button

    Button

    76
  • Color Picker

    Color Picker

    64
  • Image Comparison Slider

    Image Comparison Slider

    55
  • AI Prompt Input

    AI Prompt Input

    50
  • Text Morphing

    Text Morphing

    37
  • Navigation Menu

    Navigation Menu

    36