file-upload component

Drop-in semantic component. See examples, sizes, variants, and source.

Drag-and-drop dropzone plus per-file progress cards. Compose a file-upload-area as the dropzone and a file-upload-list of file-upload-card rows to show queued / uploading / completed files. State modifiers on the area (hover, disabled, multiple) and the card (success, uploading, error) drive the visuals; behavior is wired by file-upload.js.

File Upload Area

Basic Upload Area

Choose a file or drag & drop it here

JPEG, PNG, PDF, and MP4 formats, up to 50 MB.

Upload Area States

Release to upload

Your files will be uploaded

Upload disabled

File upload is currently unavailable

Multiple Files Upload

Drop multiple files here

You can upload up to 10 files at once

File Upload Cards

Uploaded Files - Success

PDF
google-certificate.pdf
94 KB Completed

Uploading Progress

DOC
project-proposal.docx
2.1 MB of 5.4 MB Uploading...

Upload Error

JPG
vacation-photo.jpg
File too large Failed

Multiple Files

PDF
report-2024.pdf
1.2 MB Completed
XLS
financial-data.xlsx
450 KB Completed
MP4
presentation-video.mp4
12.3 MB of 45.2 MB Uploading...

Size Variations

Tiny Size

Drop files here

Max 50 MB

Small Size

Choose files to upload

JPEG, PNG, PDF, MP4

Large Size

Drag and drop your files here

Supports multiple file formats up to 50 MB each

Common Patterns

Inline Upload Button

Class API Reference

Type Class Usage Notes
Base file-upload-area Dropzone container Holds icon + content + button + hidden input
file-upload-list Container for queued file cards Sibling of file-upload-area
file-upload-card Single queued / uploaded file row Child of file-upload-list
Structure file-input Hidden <input type="file"> Inside file-upload-area
file-icon Document badge with format label Add format class for color: pdf doc xls ppt img zip mp4
format Tiny corner label (e.g. PDF) Inside file-icon
title / description / meta / status Card text slots Inside file-upload-card .content
progress-bar / progress-fill Inline upload progress bar Set style="width: NN%" on the fill
delete-btn Remove / cancel button Right side of card
Area State hover Visual hover (manual demo state) Modifier on file-upload-area
dragging Active drag-over state Toggled by JS during drag
disabled Disables drop + browse Modifier on file-upload-area
multiple Hint that area accepts multiple files Pair with multiple attr on input
Card State success Completed upload — green tint Modifier on file-upload-card
uploading In-progress — blue tint + bar Modifier on file-upload-card
error Failed upload — red tint Modifier on file-upload-card
Sizes file-uploads xs Tiny dropzone (120px min height) Container modifier on file-uploads
file-uploads sm Small dropzone (160px) Container modifier
(default) Medium dropzone (200px) No wrapper needed
file-uploads xl Large dropzone (240px) Container modifier
file-uploads lg Big dropzone (280px) Container modifier
Image Upload image-upload Avatar / logo upload row with preview Standalone variant; sibling of dropzone
preview Preview thumbnail container Add empty for placeholder state
avatar Circular preview shape Modifier on image-upload
company Rounded-square preview shape Modifier on image-upload
Selected Info selected-files-info Blue info bar showing total selected Toggle hidden when count is zero