File Upload

Drag-and-drop or click-to-browse file input with per-file progress indicators. Supports bar or fill progress styles, controlled file list, and remove actions.

import{ FileUpload } from "@pepulux/ui"

Empty drop zone

Default state — click the zone or drag files onto it. The accept prop restricts which file types are selectable.

Click to uploador drag and drop

PNG, JPG or SVG (max 5 MB)

With completed files

Pass files with status='complete' to show the completed queue.

Click to uploador drag and drop

SVG, PNG, JPG or GIF (max. 800×400px)

PNG

profile-photo.png

124 KB of 124 KB
Complete
100%
PDF

resume.pdf

340 KB of 340 KB
Complete
100%

Mixed — uploading + complete

Mix complete and uploading statuses to show a live queue. Each file row has its own progress bar.

Click to uploador drag and drop

SVG, PNG, JPG or GIF (max. 800×400px)

PDF

report-q2.pdf

1.2 MB of 1.2 MB
Complete
100%
CSV

dataset.csv

480 KB
Uploading...
65%
JPE

cover-art.jpg

920 KB
Uploading...
30%

Fill progress style

progressType='fill' renders a full-width background fill instead of a progress bar row.

Click to uploador drag and drop

SVG, PNG, JPG or GIF (max. 800×400px)

PDF

report-q2.pdf

1.2 MB
100%
CSV

dataset.csv

480 KB
65%
JPE

cover-art.jpg

920 KB
30%

Accepting multiple file types

Set accept to any valid MIME type or extension list. The hint text informs the user.

Click to uploador drag and drop

PDF, CSV, or Excel files (max 25 MB)

Interactive — real file selection

Drop files or click to open the system file picker. Selected files appear instantly.

Click to uploador drag and drop

PNG, JPG, PDF, CSV (max 10MB)

Props

PropTypeDefaultDescription
filesFileItem[][]Controlled list of files shown below the drop zone
onUpload(files: File[]) => voidCalled with native File objects when user drops or selects files
onRemove(id: string) => voidCalled when user clicks the trash button on a file row
progressType"bar" | "fill""bar"bar shows a progress bar row; fill renders a background fill sweep
acceptstringHTML accept attribute — restricts file picker (e.g. 'image/*' or '.pdf,.csv')
maxSizeHintstringHelper text shown in the drop zone below the CTA
classNamestringAdditional CSS classes on the wrapper

Props

PropTypeDefaultDescription
id*stringUnique identifier for the file row
name*stringFile name shown in the row
size*stringHuman-readable file size (e.g. '1.2 MB')
type*stringMIME type — used to determine the file type icon color
progress*number0–100 progress percentage
status*"uploading" | "complete" | "error"Controls the progress display and check/spinner icon