File uploader
Help users select and upload a file.
Props
variant
Variant
The input display variant. "dragdrop" shows a drag-and-drop area, "button" shows a simple button.
Defaults to
dragdrop.
accept
string
Accepted file types as a comma-separated list of MIME types or file extensions (e.g., "image/*,.pdf").
Defaults to
*.
maxfilesize
string
Maximum file size with unit (e.g., "5MB", "100KB", "1GB"). Files exceeding this will be rejected.
Defaults to
5MB.
testId
string
Sets a data-testid attribute for automated testing.
Events
onSelectFile
(event: Event) => void
_selectFile
CustomEvent
Other
Do
Use file upload input with file upload card for complete file upload experiences.