Skip to content

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".

PropTypeDefault
onFilesRequired
(files: File[]) => void—
accept

As an <input type="file">'s accept: ".csv,.xlsx", "image/*". Dropped files are held to it too.

string—
disabled
booleanfalse
multiple
booleanfalse