DeliverWebsite UI

Pallet File Upload

Component

About

A drag and drop file upload where every file becomes a box on a pallet, as tall as the file is big. Boxes rise while they upload, a load line shows the capacity, and files that would overload the pallet are turned away with a reason. Keyboard friendly.

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

Code

How Pallet File Upload is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { PalletUpload } from "@/components/ui/pallet-file-upload";

const MB = 1024 * 1024;

// The demo pretends to upload: progress climbs in steps over about two seconds, faster for small files.
const pretendUpload = (file: File, onProgress: (progress: number) => void) =>
  new Promise<void>((resolve) => {
    const steps = Math.min(20, 6 + Math.round(Math.log2(file.size / 1024 + 1)));
    let step = 0;
    const timer = window.setInterval(() => {
      step += 1;
      onProgress(step / steps);
      if (step < steps) return;
      window.clearInterval(timer);
      resolve();
    }, 120);
  });

export default function Demo() {
  return (
    <PalletUpload
      title="Send DeliverWebsite your brand files."
      description="Drop your logo, photos and copy on the pallet. Each file lands as a box as tall as the file is large, and the stack grows while it uploads."
      capacity={25 * MB}
      maxFiles={8}
      labels={{
        drop: "Drop files on the pallet",
        browse: "or browse your computer",
        load: "{used} of {capacity} on the pallet",
        full: "Pallet full",
        rejected: "Too heavy for the pallet: {names}",
        remove: "Take off the pallet:",
        failed: "Failed",
      }}
      upload={pretendUpload}
      className="grid min-h-screen place-items-center"
    />
  );
}

Dependencies

More by DeliverWebsite UI

View all
  • X-Ray Lens Hero

    X-Ray Lens Hero

    53
  • Pressure Type Hero

    Pressure Type Hero

    29
  • Aperture Scroll Hero

    Aperture Scroll Hero

    21
  • Receipt Toasts

    Receipt Toasts

    3
  • Liquid Glass Navbar

    Liquid Glass Navbar

    1