A drop zone that is also a button: checks type, size and count, and says what it refused.
File upload default
Install
npx shadcn add @syncrobotic/file-upload Also installs: lucide-react, @syncrobotic/cn
Overview
An area that takes files by drop or by the picker, validates them, and hands the accepted ones to you.
When to use
- Maps, logs and recordings uploaded to a site.
- A single photo or avatar.
- A compact attach row in a form.
Use something else
- Showing files already attached: Attachment.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
File upload maps
File upload compact
File upload single image
File upload queue
File upload disabled
File upload avatar
File upload max files
File upload with progress
File upload in form
File upload formats
File upload rejected
Usage rules
- Say what is accepted and how big, in the hint.
- Report refused files by name and reason.
- Show what was taken as Attachment rows.
Changelog
- 0.10.12026-11-21With multiple off, extra files are refused as "count" through onReject instead of dropped silently; other attributes such as aria-label reach the drop zone (an icon-only zone has a name).
- 0.10.02026-11-18Disabled keeps its words readable: a grey field (bg-muted, muted text) on controls with a surface, solid disabled ink on items and icons; no more 50 % opacity, which washes text out in sunlight.
- 0.9.02026-11-17New.