Overview
File Item shows a single uploaded file with icon, name, size, status indicator (idle, uploading, success, error), progress bar, and action buttons (remove, retry). It’s designed to work with AxUploader for complete file upload flows.Usage
Status States
Idle (Default)
File selected, not yet uploading.Uploading
Shows progress bar with percentage.Success
Green checkmark indicator.Error
Red indicator, error message, and retry button.Progress Indicator
Image Preview
Show a thumbnail instead of the file type icon:Sizes
sm— Compact (for modals and drawers)md— Standard (default)
With AxUploader
Multi-File Upload
Props
File name (required). Displayed as the primary label.
File size in bytes. Formatted automatically (e.g. “2.5 MB”).
Current status of this file item:
idle— file selected, not yet uploading (default)uploading— in progress, shows progress barsuccess— upload complete, green checkmarkerror— upload failed, red indicator + optional error message
Upload progress percentage (0–100). Only rendered when
status="uploading".Error message displayed below the file name when
status="error".Example: "File exceeds 10MB limit"Override the default file-type icon. By default, the icon is inferred from the file extension in
name.Image preview URL — shown as a thumbnail in the icon box. Pass a
URL.createObjectURL(file) or data URL for image uploads. When set, replaces the file type icon entirely.Called when the user clicks the remove/cancel button.
Called when the user clicks the retry button (only shown on error).
Component size preset:
sm— compact: for modals and drawersmd— standard (default)
Disable interactions (remove, retry). Reduces opacity.
Additional CSS class name
Inline styles
File Type Icons
Icons are automatically detected from file extensions:- Excel:
.xlsx,.xls,.csv→ FileExcelOutlined - PDF:
.pdf→ FilePdfOutlined - Word:
.doc,.docx→ FileWordOutlined - Images:
.jpg,.jpeg,.png,.gif,.svg,.webp→ FileImageOutlined - Other: FileOutlined
Best Practices
Show file size to help users understand upload constraints
Use
status="uploading" with percent for real-time feedbackProvide clear error messages when uploads fail
Use
preview for image files to show thumbnailsAccessibility
- Uses
role="listitem"for list contexts - Progress bar has
role="progressbar"witharia-valuenow,aria-valuemin,aria-valuemax - Error messages use
role="alert"for screen reader announcements - Action buttons have proper
aria-labelattributes