File Dropzone

Files drop into an upload dialog, progress bars fill, and an upload toast confirms the destination. A free, MIT-licensed Remotion product scene.

Installation
$ pnpm dlx shadcn@latest add @remocn/file-dropzone

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { FileDropzone } from "@/components/remocn/file-dropzone";
 
const FileDropzoneScene = () => (
  <FileDropzone
    title="Upload files"
    destination="Research"
    files={[{ name: "Q3-board-deck.pdf", size: 4200000 }, { name: "customers.csv", size: 640000 }]}
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="FileDropzone"
    component={FileDropzoneScene}
    durationInFrames={195}
    fps={30}
    width={1280}
    height={720}
  />
);

An upload modal opens over an app window; file cards drop into the dropzone, rows appear with progress bars that finish at different times, then Upload is clicked and the files land in the table behind with a confirming toast. Pass files (name, size in bytes, optional type), title and destination. Pass image for the preview of image files; the default image only exists in the Remocn repo. Ships light and dark.

The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop.

Props17

PropTypeDefault
files
DropFile[]DEFAULT_FILES

Up to three files: name, size in bytes, optional type

title
string"Upload files"

Modal title

destination
string"Research"

Where files go; shown in the window, rows and toast

image
stringstaticFile("reel/reel-2.jpg")

Preview for image files; default exists only in the Remocn repo

prompt
string"Drop files here or"

Line in the empty drop zone, before the browse link.

releaseLabel
string"Release to upload"

Line in the drop zone while files hover over it.

hint
string"PDF, PNG or CSV, up to 50 MB"

Accepted types and size limit under the prompt.

accent
string"#3B5BFD"

Accent color for highlights, buttons and progress

ink
string—

Text color; overrides the theme ink.

fontFamily
string"Geist"

Typeface for the copy. Load the font in your project first.

speed
number1

Playback speed multiplier for the whole timeline

theme
"light" | "dark""light"

Light or dark palette

ground
GshPresetId—

gradients.sh preset id for the backdrop shader

groundParams
Partial<GradientParams>—

Overrides for the backdrop shader parameters

background
string—

Solid fill in place of the gradient ground; pass "transparent" to drop it.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

  • filesDropFile[]

    Up to three files: name, size in bytes, optional type

    DefaultDEFAULT_FILES

  • titlestring

    Modal title

    Default"Upload files"

  • destinationstring

    Where files go; shown in the window, rows and toast

    Default"Research"

  • imagestring

    Preview for image files; default exists only in the Remocn repo

    DefaultstaticFile("reel/reel-2.jpg")

  • promptstring

    Line in the empty drop zone, before the browse link.

    Default"Drop files here or"

  • releaseLabelstring

    Line in the drop zone while files hover over it.

    Default"Release to upload"

  • hintstring

    Accepted types and size limit under the prompt.

    Default"PDF, PNG or CSV, up to 50 MB"

  • accentstring

    Accent color for highlights, buttons and progress

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • fontFamilystring

    Typeface for the copy. Load the font in your project first.

    Default"Geist"

  • speednumber

    Playback speed multiplier for the whole timeline

    Default1

  • theme"light" | "dark"

    Light or dark palette

    Default"light"

  • groundGshPresetId

    gradients.sh preset id for the backdrop shader

  • groundParamsPartial<GradientParams>

    Overrides for the backdrop shader parameters

  • backgroundstring

    Solid fill in place of the gradient ground; pass "transparent" to drop it.

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0