Attach files to a task
Use file upload when users need to attach documents, images, or other files.
Use file upload when users need to attach documents, images, or other files.
Display the filename and size so users can check what they added.
Use accepted types, size guidance, and feedback to reduce upload errors.
Label (optional)
Action (button)
Hint text (optional)
File upload supports a default button-style picker and a drag-and-drop surface.
Use the default variant for compact forms or single file inputs.
Allow more than one file to be selected at once.
Only one file can be selected; reselecting replaces the previous one.
Restrict the file picker to specific file types using the accept attribute.
No restriction on file type.
Disable the upload button to prevent users from picking a file.
Default interactive state.
Show error styling and feedback when the upload is invalid.
No feedback shown.
Each row is a colour, spacing, or size value the component uses, and the right-most column tells you where in the component you'll see it.
sgds-form-padding-x—sgds-form-padding-y—sgds-form-gap-lg—sgds-form-gap-md—sgds-form-gap-sm—sgds-form-gap-xl—sgds-gap-md16pxsgds-border-radius-md8pxsgds-border-width-11pxsgds-border-width-2Width variessgds-form-border-width-defaultWidth variessgds-form-border-width-thickWidth variessgds-font-size-12—sgds-font-size-14—sgds-line-height-16Height variessgds-line-height-20Height variessgds-icon-size-md—sgds-icon-size-lg—sgds-margin-xl—sgds-padding-2-xl32pxsgds-motion-duration-standard—sgds-motion-easing-enter—sgds-motion-easing-exit—sgds-motion-easing-standard—sgds-form-outline-focus—sgds-form-outline-offset-focus—sgds-form-border-radius-md—Tell users which file types and sizes are accepted before they pick a file to reduce failed uploads.
Use a clear verb-led label inside the slot, for example Upload report, rather than generic File or Browse.
Set the accept attribute to filter the system file picker so users do not have to scan files manually.
For a short value such as a reference number, use a text input. Uploading a file adds friction.
Add the multiple attribute when the task expects several files in one go, such as photo evidence.
Pair required with hasFeedback and invalidFeedback so the empty state can be flagged inline.
TabShift+TabEnterSpaceShare them with us on Slack → #ask-sgds-v3
Report it on GitHub Issues → sgds/components/file-upload
The Singapore Government Design System was developed to empower teams in creating fast, accessible and mobile-friendly digital services.