File Upload
A dashed dropzone that takes clicks, keyboard and dragged files, plus a row component for each uploaded file. Its accept and size limits are a convenience for the person choosing files, not a security check: a server that receives them must check each file's real type from its content and its size, and store it outside the web root.
tsx
import { FileUpload, FileUploadItem } from "@pestoui/core"Dropzone
The zone is the button, so click, Enter and Space all open the picker. Passing accept and maxSize writes the hint line for you, and dragged files are re-checked against both.
Sizes & disabled
Uploaded files
One FileUploadItem per file inside a <ul>. Status drives everything: uploading shows the progress bar and percentage, error tints the row and prints the message. Remove a row to see it go.
- brand-guidelines.pdf2.3 MB · 64%
- team-photo.png820 KB
- quarterly-report.csv18 MBquarterly-report.csv is 18 MB — the limit is 10 MB.
Props
Pesto UI · 117 documented components