From 0403f14acf7e4b33feb3462b0f442e4573a5a6fe Mon Sep 17 00:00:00 2001 From: noah Date: Thu, 16 Apr 2026 15:41:29 +0200 Subject: [PATCH] feat: improve drop zone with gradient icon, format pills, and card layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Combines gradient icon (pink→purple with glow) and soft card wrapper with format type pills so the empty state feels more alive and informative. Co-Authored-By: Claude Sonnet 4.6 --- src/components/DropZone.tsx | 171 ++++++++++++++++++++++-------------- 1 file changed, 106 insertions(+), 65 deletions(-) diff --git a/src/components/DropZone.tsx b/src/components/DropZone.tsx index 7fb5b04..e99df23 100644 --- a/src/components/DropZone.tsx +++ b/src/components/DropZone.tsx @@ -15,6 +15,17 @@ interface DropZoneProps { onBrowse: () => void; } +const FORMAT_PILLS = [ + { label: "IMG", color: "bg-pink/10 text-pink" }, + { label: "PDF", color: "bg-orange/10 text-orange" }, + { label: "MP4", color: "bg-purple/10 text-purple" }, + { label: "MP3", color: "bg-blue/10 text-blue" }, + { label: "SVG", color: "bg-teal/10 text-teal" }, + { label: "CSV", color: "bg-mint/10 text-mint" }, + { label: "DOCX", color: "bg-orange/10 text-orange" }, + { label: "+60", color: "bg-[#f6f6f6] text-text-light" }, +]; + export function DropZone({ isDragging, onDragEnter, @@ -23,7 +34,6 @@ export function DropZone({ onDrop, onBrowse, }: DropZoneProps) { - // Empty state inside Finder window return (
- {/* Upload icon */} - - - - - - + + + + + -
-

- {isDragging ? "Release to add" : "Drop files here"} -

-

- {isDragging - ? "Your files are ready for transformation" - : "Images, documents, audio, video, data — all formats welcome"} + {/* Heading + subtitle */} +

+

+ {isDragging ? "Release to add" : "Drop files here"} +

+

+ {isDragging + ? "Your files are ready for transformation" + : "Images, documents, audio, video, data — all formats welcome"} +

+
+ + {/* Format pills */} + {!isDragging && ( +
+ {FORMAT_PILLS.map(({ label, color }) => ( + + {label} + + ))} +
+ )} + + {/* Browse button */} + + + + + Browse files + + + {/* Trust signal */} +

+ 70+ formats — 100% client-side

- - - - - - Browse files - - -

- 70+ formats — 100% client-side -

);