build69
build69  /  Components  /  Media & Files  /  FileUpload

FileUpload

v1.0.8Updated 27 Aug 2026

Drag-drop dropzone with click-to-pick fallback, per-file progress, rejection feedback, and a virus-scan placeholder. Three layouts: default panel, single-line compact, and round avatar picker.

Preview

Live · 9 stories
DefaultOpen ↗
Why this is recommendedformuploadfiledropzone+2

The default, out-of-the-box FileUpload.

Recommended for+14
  • CV / document upload
  • Email attachment picker
  • CSV / data import
  • Avatar image picker (avatar variant)
Tags+6
formuploadfiledropzoneattachmentdefault
Features+4
  • Drag-and-drop with hover affordance
  • Per-file progress bar
  • Rejection feedback (size / type / count) via inline Alerts
  • Multi-file with maxFiles + maxSize guards
  • Avatar variant with live image preview
  • Server scan placeholder state
  • i18n: labels prop overrides every built-in string (prompt, statuses, rejection reasons, aria-labels); file sizes and progress percentages format via LocaleProvider/useB69Locale
Not recommended for−2
  • Inline single-file inputs (use Input type="file")
  • File browser / manager (use FileBrowser)

Install

Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.

get_registry_item({ name: "FileUpload" })

Usage

import { FileUpload } from '@/components/media/file-upload';

<FileUpload accept={['image/*', '.pdf']} maxSize={10 * 1024 * 1024} multiple onFiles={upload} />

Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.

Props

PropTypeRequired
onFiles

Callback with accepted File[]

function
accept

Allowed MIME types or extensions

string[]
maxSize

Max single-file size in bytes

number
maxFiles

Max total files accepted

number
variant

Visual layout

'default' | 'compact' | 'avatar'
multiple

Allow multi-select

boolean
labels

Override any built-in UI string — dropzone prompt, helper line, statuses, rejection reasons, aria-labels (i18n). Merged over DEFAULT_FILE_UPLOAD_LABELS; {token} templates for parameterized strings.

Partial<FileUploadLabels>

Related