UploadKit
SDK@uploadkitdev/react

UploadDropzoneTerminal

A monospace terminal-style dropzone with a blinking cursor and tail-style upload log.

A dropzone disguised as a terminal session. A blinking block cursor sits after the prompt line, and each dropped file streams into a tail -f style log with [OK], [..], and [ERR] tags. Perfect for developer-tooling landing pages and CLI-first products.

Design inspiration: Raycast, Warp, Vercel build logs.

motion is an optional peerDependency. Without it, log lines appear instantly instead of sliding in. pnpm add motion to enable per-line enter animations.

> drop files to upload

Raycast · Warp — mono prompt + tail log

Basic usage

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

export default function Page() {
  return (
    <UploadDropzoneTerminal
      route="logUploader"
      accept={['text/plain', 'application/json']}
      maxSize={5 * 1024 * 1024}
      onUploadComplete={(results) => {
        console.log('Uploaded:', results.map((r) => r.key));
      }}
    >
      drop files to upload
    </UploadDropzoneTerminal>
  );
}

Props

PropTypeDefaultDescription
routestringRequired. Route name from your file router.
acceptstring[]Accepted MIME types. Supports wildcards: 'text/*'.
maxSizenumberMaximum file size in bytes.
maxFilesnumberMaximum number of files per drop or selection. When set to 1, the file input becomes single-select.
metadataRecord<string, unknown>JSON-serializable metadata forwarded to the server.
onUploadComplete(results: UploadResult[]) => voidCalled when every accepted file has uploaded.
onUploadError(error: Error) => voidCalled once per failed file. The error is also shown as an [ERR] log line.
disabledbooleanfalseDisables drag, click, and the hidden file input.
classNamestringAdditional CSS class(es) merged onto the outer wrapper.
childrenReactNodeCustom prompt text. Defaults to "drop files to upload".

UploadDropzoneTerminal accepts a ref forwarded to the outer <div>.

Theming

UploadDropzoneTerminal reads these CSS custom properties:

VariablePurpose
--uk-terminal-bgTerminal background (default #0a0a0b)
--uk-terminal-fgPrompt and success text color (default #4ade80)
--uk-terminal-dimBorder color when idle (default #166534)

The component uses a monospace font stack (ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace) directly rather than --uk-font, so it stays monospace even if you theme the base font.

Accessibility

  • role="button" with aria-label="Drop files to upload"
  • Focusable via keyboard; Enter and Space open the file picker
  • Log container uses aria-live="polite" so screen readers announce new upload events
  • focus-visible outline uses --uk-terminal-fg for on-brand focus
  • Respects prefers-reduced-motion — both the blinking cursor and log line animations collapse to near-zero duration

See the Theming guide for token overrides and dark mode.

On this page