Components
File Drop
Somewhere to drop files, or click to choose them, that lights up as files are dragged over it.
Import
import { FileDrop } from '@rinzai/zen';API reference
<FileDrop>
Somewhere to drop files, or click (or press Enter) to choose them: it lights up while files are dragged over it. onFiles gets those that accept allows (one, unless multiple). Children are what it says, e.g. "Drop a CSV here".
| Prop | Type | Default |
|---|---|---|
onFilesRequired | (files: File[]) => void | — |
acceptAs an <input type="file">'s accept: ".csv,.xlsx", "image/*". Dropped files are held to it too. | string | — |
disabled | boolean | false |
multiple | boolean | false |