Dropzone
File drop with preview.
Loading…
File drop with preview.
Loading…
Entry point for file-based tools — drop or click to load images/files.
| Prop | Type | Default | Description |
|---|---|---|---|
| onFileAccept | (file: File) => void | — | Called with accepted file. |
| accept | string | image/* | Accepted MIME types. |
| maxSize | number | 10MB | Max file size in bytes. |
| preview | string | null | — | Preview URL for loaded file. |
| className | string | — | Optional CSS class. |
Also copy lib/utils.ts (cn helper):