Chat Attachment
A file chip for message attachments and upload previews. The leading icon is inferred from the filename extension, the name truncates with a hover title, and href / removable turn it into a download link or a dismissible chip.
proposal.pdf2.4 MB
hero.png840 KB
assets.zip18 MB
Installation
Copy the piece into your app — it compiles with your build and the code is yours:
puzzle add piece chat-attachment
The size prop is a preformatted string — the chip does no byte math. Removal is delegated: the chip never mutates a list itself, it fires @remove(name) and the parent drops the file.
Usage
import ChatAttachment from '@/components/ui/ChatAttachment.pzl';
<ChatAttachment name="proposal.pdf" size="2.4 MB" />
Removable
proposal.pdf2.4 MB
hero.png840 KB
assets.zip18 MB
Types
report.pdf1.1 MB
screenshot.png620 KB
demo.mp442 MB
voice-memo.m4a3.2 MB
release.zip18 MB
build9 MB