Search for a command to run...
Drag & drop files here
or click to browse
Max 5MB per file
Drag and drop anywhere. The fastest way to get files into the context window.
npx shadcn@latest add https://ui.heygaia.io/r/file-dropzone.jsonimport { FileDropzone } from "@/components/ui/file-dropzone";
export default function Example() {
return (
<FileDropzone
onFilesDropped={(files) => console.log(files)}
accept="image/*,.pdf"
maxSize={5 * 1024 * 1024}
maxFiles={5}
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
| onFilesDropped | (files) => void | - | Callback with dropped files |
| accept | string | - | Accepted file types |
| multiple | boolean | true | Allow multiple files |
| maxSize | number | 10MB | Max file size in bytes |
| maxFiles | number | 10 | Maximum number of files |
| disabled | boolean | false | Disable the dropzone |