Cameron Kelliher

UploadThing Dropzone

Component 2

About

A drag-and-drop file upload zone with progress tracking, validation, and uploaded-file management that works with any upload backend.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds UploadThing Dropzone to your project and fits it to your theme.

Code

How UploadThing Dropzone is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { UploadThingDropzone } from "@/components/ui/uploadthing-dropzone";

export default function UploadThingDropzoneDemo() {
  const handleUpload = async (files: File[]) => {
    await new Promise((resolve) => setTimeout(resolve, 1500));
    return files.map((file) => ({
      name: file.name,
      size: file.size,
      type: file.type,
      url: URL.createObjectURL(file),
    }));
  };

  return (
    <div className="flex min-h-[420px] w-full items-center justify-center bg-background p-6 text-foreground">
      <div className="w-full max-w-md">
        <UploadThingDropzone
          onUpload={handleUpload}
          maxFiles={4}
          maxSize={4 * 1024 * 1024}
        />
      </div>
    </div>
  );
}

More by Cameron Kelliher

View all
  • AI Chain of Thought

    AI Chain of Thought

    111
  • Helix Loader

    Helix Loader

    94
  • AI Streaming Text

    AI Streaming Text

    50
  • AI Tool Call

    AI Tool Call

    45
  • Signal Bars Loader

    Signal Bars Loader

    41
  • Glitch Text Loader

    Glitch Text Loader

    41
  • AI Prompt Diff

    AI Prompt Diff

    39
  • AI Routing Indicator

    AI Routing Indicator

    34