File Attachment Chips
Attachment chips with a type-coloured icon and size; new chips pop in, removed ones collapse, and the rest reflow with spring layout animation.
attachmentchipsfilesremovecomposer
Installation
Run the shadcn CLI in a project with Tailwind CSS. The component lands in components/pixelpapa/file-attachment-chips.tsx.
$pnpm dlx shadcn@latest add "https://pixelpapa.com/r/file-attachment-chips.json"Manual install+
1. Install the dependencies.
$pnpm add lucide-react motion2. Copy the code from the Code tab above into your project. It imports the cn helper from @/lib/utils, which every shadcn project already has.
Build it with AI
Prefer to let an agent do the wiring? Copy this prompt, describe where the component should go, and paste.
AI prompt
Paste into Claude, Cursor, v0 or Lovable
Add the "File Attachment Chips" component from PixelPapa UI to this project. What it is: Attachment chips with a type-coloured icon and size; new chips pop in, removed ones collapse, and the rest reflow with spring layout animation. Category: Files & Uploads. Depends on: lucide-react, motion. 1. Install it with the shadcn CLI: npx shadcn@latest add "https://pixelpapa.com/r/file-attachment-chips.json" (If the CLI is unavailable, fetch that URL, write files[0].content to components/pixelpapa/file-attachment-chips.tsx and install the listed dependencies.) 2. Import it from "@/components/pixelpapa/file-attachment-chips" and place it where I describe below. 3. Keep its animation timings and accessibility attributes. Replace the demo copy and data with content that fits my product, and use my existing theme tokens (bg-background, text-foreground, bg-primary, border-border) rather than hard-coded colours. Where to use it: <describe the page and position here>
More files & uploads
- File List ProgressAn upload queue with pause, resume, cancel and retry: two files transfer at a time, queued ones start on their own, and finished rows settle with a drawn check.
- File Preview GridA grid of file tiles colour-coded by type, each with a drawn preview; tiles lift on hover to reveal actions and a selection count rolls in the header.
- File Tree ExplorerA file tree with spring-animated folders, indent guides and full arrow-key navigation; the selection highlight slides between rows.
- File Upload DropzoneA dropzone that lifts and glows while files hover over it, then lists each file with its own simulated progress bar, a drawn check on completion and a remove button.