File picker, file selector, file upload, file attachment.
File input
ECT approvedUpdated May 21, 2026
Description
A file input uploads a single file or multiple files selected by a user, as part of a form.
Anatomy
Anatomy
Size
- A file input is available in M size for fonts and subcomponents. If you need S or L size_,_ please let us know.
- The input container has minimum height and maximum width applied using tokens.
- You can define a maximum height for a multiple file input. Display a vertical scrollbar when the content exceeds the defined height.
States
Component-specific states
Default
Dragging
Drag over
Empty Error
Variations
Number of files
Both the single and multiple variations support browsing, and drag and drop.
Single file variant
Multiple file variant
Thumbnail
When image file types are uploaded, a thumbnail may be shown.
With thumbnail
Without thumbnail
Progress tracking
- Use the tracked progress ring when possible.
- Provide clear and useful status information.
Progress percentage tracked
Progress percentage undefined
Dos and don'ts
Do
Do
Do
Do
Do
Do
Other names
File picker, file selector, file upload, file attachment.
Label set
- The file input should have a clear label describing the purpose of the input.
- The accepted file types should be clearly provided to the user using appropriate hint text.
Input status examples
| Use case | Example status summary |
|---|---|
| No files added yet | No files |
| Files uploaded | 1 file uploaded3 files uploaded |
| Error on displaying the file tiles | Unable to show attachments. Refresh the page to try again. |
| Uploading files | 2 files uploading... |
File status examples
- 23% uploaded
- Checking for viruses...
- File uploaded
Error message examples
| Use case | Example error message |
|---|---|
| File is too large | File not uploaded. Upload a file smaller than [maxFileSize]MB. |
| File format not supported | File format not supported. Upload a [variable=filetype]. |
| File not found | File not found. Check the file path is correct. |
| Unknown issuesService too busyService not responding | There were issues uploading the file. Try again in a few minutes. |
| Security issue | File not uploaded due to security issues. Fix the file and try again. |
| File already uploaded | A file with this name already exists. Rename the file and try again. |
| Too many files | You've reached the maximum of [maximum number]uploaded files. Delete some files and try again. |
| Insufficient storage space | File not uploaded as you've reached the storage limit. Delete some files and try again. |
| Invalid name | Invalid file name. Rename the file using only the following characters: a-z, A-Z, 0-9, and _.- () File name must be 128 characters or less. |
Requirements
Users should be able to:
- Navigate to the file input and upload a file.
- Understand accepted file types and format restrictions.
- Receive confirmation of uploaded files with the ability to replace if needed.
Interactions
Users should have the option to either drag and drop files into a target area or upload using a button and file selection.
Mouse Interactions
- Users should be able to drag and drop files into a target area. This target area should have 44px padding from the ‘upload’ button.
- Clearly indicate the target zone when a file is dragged over it.
Keyboard interactions
- Tab. Moves focus from the previous interactive element on the page to the file upload button.
- Pressing ‘tab’ from the file upload area while a file is processing moves focus to the ‘cancel’ button.
- Pressing ‘tab’ from the ‘cancel’ or ‘clear’ button moves focus to the file upload button.
- Pressing 'tab' when a file is uploaded moves focus to the file name link.
- Enter or Space. Activates the button and brings up a file dialog.
- After a file has been selected and uploaded, focus is pulled to the file upload area.
Design considerations
- The file input should have a visible label describing the purpose of the input.
- The accepted document types should be clearly provided to the user using appropriate hint text.
- Provide a clear visual indicator for the drag and drop target zone.
- Make sure the drag and drop area has clear hover and drag over states so users know the area is interactive.
- Make sure that text in all states meets a 4.5:1 minimum contrast ratio with its background.
- Uploaded files should be added and displayed above the file input area. This enables keyboard-only users and screen reader users, and improves general readability.
Development considerations
- Use input type=”file” so that screen reader users understand the purpose of the input.
- Screen reader users should be informed of uploading states and any errors using an aria-live region.
- All ‘clear’ and ‘delete’ buttons should be programmatically associated with the uploaded file name using aria-describedby so that screen reader users understand which file will be removed.
| Date | Changes |
|---|---|
| March 2026 | Added an asset into DO section. Update the primary CTA to “Download” when preview is not available.Added an Empty Error component state |
| October 2025 | Updated all examples as file links were replaced by buttons below |
| August 2025 | Updated guidance on the accessibility tab. |
| October 2024 | Updated anatomy imageUpdated size guidanceRemoved guidance which is not relevant to the updated Figma component.Added states that are unique to the componentUpdated some images that had incorrect border widthsCorrected the caption on the first DoUpdated the image on the file icon DoRemoved irrelevant text in error Do |
| September 2024 | New version created. Previous version archived in the frozen Product design system. |