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
Examples
Examples show common usage patterns and implementation guidance.

Other

Use file upload input with file upload card for complete file upload experiences.
All GoA Design System components are built to meet WCAG 2.2 AA standards. The following guidelines provide additional context for accessible implementation.

No accessibility-specific guidelines have been documented for this component yet.