UploadList component provides a complete file management interface, displaying all files in the upload collection with their status, progress, and actions. It includes buttons for uploading, adding more files, clearing the list, and confirming completion.
Overview
UploadList extendsLitUploaderBlock and serves as the main activity for managing uploads. It displays file items, tracks upload progress, shows validation errors, and provides controls for managing the upload workflow.
Basic Usage
Display Modes
Configure the file display mode via the Config component:Features
File Display
- Shows all files with thumbnails (when applicable)
- Displays upload progress for each file
- Shows file size and name
- Indicates validation errors per file
- Allows individual file removal
Progress Tracking
The header dynamically updates to show:- Total file count
- Number of files uploading
- Number of successful uploads
- Number of failed uploads
Action Buttons
Upload Button
Shown whenconfirmUpload is enabled:
Done Button
Shown after successful uploads:Add More Button
Allows adding additional files:Clear Button
Removes all files from the collection:Configuration
Show Empty List
show-empty-list to always display it.
Upload Confirmation
- Files are not uploaded automatically
- User must click “Upload” button
- Useful for review workflows
File Count Restrictions
- Shows error if too few files
- Disables “Add more” when max reached
- Shows validation messages
Group Output
Custom Content
Empty State
Customize the empty state message:State Management
The component tracks comprehensive upload state:Events
UploadList emits events through the UploadCtxProvider:Error Handling
Errors are displayed prominently:Collection Errors
Individual File Errors
Each file item shows its own errors:- Validation errors
- Upload errors
- Network errors
Examples
Basic Setup
With Manual Upload Confirmation
Grid View with File Limits
Always Visible with Custom Empty State
With Group Output
Complete Upload Flow Handler
Button Visibility Logic
The component intelligently shows/hides buttons:Accessibility
ARIA Live Region
The header usesaria-live="polite" to announce status changes:
Keyboard Navigation
- All buttons are keyboard accessible
- Focus management during upload
- Escape key closes the modal (when used in modal context)
Screen Reader Support
- Meaningful button labels
- Status announcements
- Error messages are associated with their context
Styling
Internal Components
UploadList uses these child components:uc-activity-header- Header with title and close buttonuc-file-item- Individual file displayuc-drop-area- Ghost drop zone for adding more filesuc-icon- Icons for buttons
Source Code Reference
Implementation:/workspace/source/src/blocks/UploadList/UploadList.ts:26
File item component: /workspace/source/src/blocks/FileItem/FileItem.ts
See Also
- UploadCtxProvider - Event handling
- Config - Configuration options
- DropArea - File drop zone