FileUpload
Choose or drop attachments with validation, upload progress and recovery actions.
Installation
Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.
Copy an example into your project with the shadcn CLI: npx shadcn@latest add https://design.gaudi.site/r/file-upload-avatar.json.
Usage
Examples
Profile photo picker
Banner image for a page
Drag and drop
Upload table with progress
Image gallery with sorting
API
11 props
Accessibility
The native file input remains keyboard accessible. Announce rejection reasons and retain valid files.
Notes
- Selecting files does not upload them. The application owns storage, network requests and cancellation.
Related
BannerBanner renders a compact announcement strip.5 examplesTableSemantic article tables with contained horizontal scrolling.7 examplesDialogModal, confirmation and bare full-screen dialogs for editing, detail inspection, explicit decisions, lightboxes and launchers.12 examplesProgressDeterminate and indeterminate progress with a readable task label.4 examplesSortableReorder lists and grids with drag handles, keyboard controls and cancellation.4 examplesCardCard frames reusable content with title, subtitle, and optional children.8 examples