runway

Runway

File Drop

A file drop component for uploading files


Drop files here, or click to select


The FileDrop component provides a user-friendly drag-and-drop interface for uploading files. It supports customization of text, color, icon, and much more.

Want a single file upload? Check out the FileInput component.



Usage

javascript

1import FileDrop from "@/components/atoms/FileDrop";
2
3<FileDrop
4    onDrop={(files) => console.log(files)}
5/>



Props

PropTypeDefaultDescription
textstring"Drop files here, or click to select"The text to display in the component.
subtextstring""The subtext to display in the component.
colorstring"gray"The base color (use tailwind.config).
activeColorstring"primary"The base color (use tailwind.config).
iconReactNode-The icon to display in the component.
borderRadiusstring"lg"The border radius of the component.
borderClassstring"border-2 border-dashed"The border class of the component.
acceptstring"*"The file types to accept.
multiplebooleantrueIf true, multiple files can be uploaded.
classNamestring""Additional Tailwind utility classes.
...propsobject-Any other valid HTML attributes.



Examples

Basic Usage

Drop files here, or click to select


Customized FileDrop

Upload your documents

We accept .pdf, .docx, and .txt files