UploadKit
SDK@uploadkitdev/react

UploadEnvelope

A WeTransfer-inspired 3D envelope that opens its flap on drag-over, accepts files, and seals with a wax stamp on completion.

A skeuomorphic envelope with CSS 3D perspective transforms. The flap opens when you drag over it, files visually "slide in", and a wax seal with a checkmark appears when all uploads complete. Charming and memorable.

Design inspiration: WeTransfer, physical mail metaphor.

motion is an optional peerDependency. Without it, the flap uses CSS transitions. pnpm add motion for spring-physics flap opening and wax seal bounce-in.

Drop files to send

WeTransfer — 3D envelope

Basic usage

import { UploadEnvelope } from '@uploadkitdev/react';

export default function Page() {
  return (
    <UploadEnvelope
      route="fileUploader"
      maxFiles={5}
      onUploadComplete={(results) => {
        console.log('Sealed:', results.length, 'files');
      }}
    />
  );
}

Props

PropTypeDefaultDescription
routestringRequired. Route name from your file router.
acceptstring[]Accepted MIME types.
maxSizenumberMaximum file size in bytes.
maxFilesnumberMaximum number of files.
metadataRecord<string, unknown>Metadata forwarded to the server.
onUploadComplete(results: UploadResult[]) => voidCalled after all files upload.
onUploadError(error: Error) => voidCalled on failure.
classNamestringAdditional CSS class(es).
childrenReactNodeOverride the caption.

Visual states

StateAppearance
IdleEnvelope closed, "Drop files into the envelope"
Drag-overFlap opens via rotateX(180deg) with perspective
UploadingFlap open, progress fill rises in envelope body
CompleteWax seal appears with checkmark, flap closes

Accessibility

  • role="button" with keyboard Enter/Space support
  • aria-live caption region
  • Decorative elements are aria-hidden
  • Respects prefers-reduced-motion

On this page